fix: update version to match with the release (#36) #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push Docker image | |
on: | |
push: | |
branches: | |
- 'release/*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: qbruynseraede | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract release version from branch name | |
id: release_version | |
run: echo "::set-output name=version::${GITHUB_REF##*/}" | |
- name: Build Docker image | |
run: > | |
docker build | |
-t qbruynseraede/tf-profile:${{ steps.release_version.outputs.version }} | |
-f build/Dockerfile | |
. | |
- name: Push Docker image | |
run: docker push qbruynseraede/tf-profile:${{ steps.release_version.outputs.version }} | |