Skip to content

Commit 7d5dbd2

Browse files
Update Docker Image Versioning
1 parent f6df73a commit 7d5dbd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/docker.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
uses: actions/checkout@v1
1515

1616
- name: Build API image
17-
run: docker build src/api/ --file src/api/Dockerfile --tag robinmanuelthiel/microcommunication-api:$(date +%s) --tag robinmanuelthiel/microcommunication-api:latest
17+
run: docker build src/api/ --file src/api/Dockerfile --tag robinmanuelthiel/microcommunication-api:${{ github.run_id }}.${{ github.run_attempt }} --tag robinmanuelthiel/microcommunication-api:latest
1818

1919
- name: Build Random image
20-
run: docker build src/random/ --file src/random/Dockerfile --tag robinmanuelthiel/microcommunication-random:$(date +%s) --tag robinmanuelthiel/microcommunication-random:latest
20+
run: docker build src/random/ --file src/random/Dockerfile --tag robinmanuelthiel/microcommunication-random:${{ github.run_id }}.${{ github.run_attempt }} --tag robinmanuelthiel/microcommunication-random:latest
2121

2222
- name: Build Web image
23-
run: docker build src/web/ --file src/web/Dockerfile --tag robinmanuelthiel/microcommunication-web:$(date +%s) --tag robinmanuelthiel/microcommunication-web:latest
23+
run: docker build src/web/ --file src/web/Dockerfile --tag robinmanuelthiel/microcommunication-web:${{ github.run_id }}.${{ github.run_attempt }} --tag robinmanuelthiel/microcommunication-web:latest
2424

2525
- name: Login to Docker Hub
2626
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}

0 commit comments

Comments
 (0)