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

refactor: update Dockerfile and workflow to use dynamic Docker repository #146

Merged
merged 2 commits into from
Nov 9, 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
7 changes: 4 additions & 3 deletions .github/workflows/build-mongo-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
env:
VERSION: ""
DOCKER_REPOSITORY: ${{ vars.DOCKER_REPOSITORY || github.repository_owner }}

steps:
- uses: actions/checkout@v4
Expand All @@ -36,9 +37,9 @@ jobs:
- name: Build Mongo Tool image
uses: docker/build-push-action@v6
with:
tags: maxisam/mongo-tool:${{ env.VERSION }}
tags: ${{ env.DOCKER_REPOSITORY }}/mongo-tool:${{ env.VERSION }}
file: ./mongo-tool/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/mongo-tool:buildcache-dev
cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/mongo-tool:buildcache-dev,mode=max
cache-from: type=registry,ref=${{ env.DOCKER_REPOSITORY }}/mongo-tool:buildcache-dev
cache-to: type=registry,ref=${{ env.DOCKER_REPOSITORY }}/mongo-tool:buildcache-dev,mode=max
1 change: 0 additions & 1 deletion mongo-tool/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Use a specific version of the Go Alpine image
FROM golang:1.22.8-alpine3.20 AS builder

# Build arguments
Expand Down
Loading