Skip to content

Commit 24baddb

Browse files
Samuel Ramirez BerdunSamuel Ramirez Berdun
authored andcommitted
Add version to docker build
1 parent 8bf9940 commit 24baddb

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/docker-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,19 @@ jobs:
2222
username: ${{ secrets.DOCKER_USERNAME }}
2323
password: ${{ secrets.DOCKER_PASSWORD }}
2424

25+
- name: Set version tag
26+
id: version
27+
run: |
28+
VERSION=$(cat version.txt)
29+
echo "Version from file: ${VERSION}"
30+
echo "VERSION=${VERSION}" >> ${GITHUB_OUTPUT}
31+
2532
- name: Build and push Docker image (multi-arch)
2633
uses: docker/build-push-action@v5
2734
with:
2835
context: .
2936
platforms: linux/amd64,linux/arm64
3037
push: true
31-
tags: ${{ secrets.DOCKER_USERNAME }}/speedtest-monitor:latest
38+
tags:
39+
${{ secrets.DOCKER_USERNAME }}/speedtest-monitor:latest
40+
${{ secrets.DOCKER_USERNAME }}/speedtest-monitor:${{ steps.version.outputs.VERSION }}

0 commit comments

Comments
 (0)