Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag Docker image with Git tag when building, and pin that tag in the Dockerfile #199

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ jobs:
docker-base-image-build-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: mr-smithers-excellent/docker-build-push@v5
- uses: actions/checkout@v3
- uses: mr-smithers-excellent/docker-build-push@v6
with:
image: kobotoolbox/reports_base
tags: latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, if you do not pass a tags input this action will use an algorithm based on the state of your git repo to determine the Docker image tag(s)

https://github.com/mr-smithers-excellent/docker-build-push?tab=readme-ov-file#auto-tagging-with-gitops

# Use the Git tag for the Docker image tag (done automatically), and
# additionally tag the new image as `latest`
addLatest: true
registry: docker.io
dockerfile: Dockerfile.base
username: ${{ secrets.DOCKER_HUB_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM kobotoolbox/reports_base
FROM kobotoolbox/reports_base:3.3

###############
# koboreports #
Expand Down