Skip to content

Commit

Permalink
refactor: update Dockerfile and workflow to use dynamic Docker reposi…
Browse files Browse the repository at this point in the history
…tory (#146)
  • Loading branch information
maxisam authored Nov 9, 2024
1 parent 89790e9 commit 04aafe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 04aafe1

Please sign in to comment.