mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 12:23:12 +00:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: build-and-push-release-image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
# Run on pushing branches like `release/1.0.0`
|
|
- "release/*.*.*"
|
|
|
|
jobs:
|
|
build-and-push-release-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Extract build args
|
|
# Extract version from branch name
|
|
# Example: branch name `release/1.0.0` sets up env.VERSION=1.0.0
|
|
run: |
|
|
echo "VERSION=${GITHUB_REF_NAME#release/}" >> $GITHUB_ENV
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: yourselfhosted
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
install: true
|
|
|
|
- name: Build and Push
|
|
id: docker_build
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: ./
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: yourselfhosted/slash:latest, yourselfhosted/slash:${{ env.VERSION }}
|