diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e51861b0..070a8aa7 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -89,15 +89,25 @@ jobs: needs: test if: github.ref == 'refs/heads/master' + permissions: + contents: read + packages: write + steps: - - uses: actions/checkout@v1 - - uses: docker/build-push-action@v1 - env: - DOCKER_BUILDKIT: 1 + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 with: + registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - registry: docker.pkg.github.com - repository: mindleaps/tracker/mindleaps-tracker-canary - build_args: APP_ENV=prod - tag_with_ref: true \ No newline at end of file + + - uses: docker/build-push-action@v6 + with: + context: . + push: ${{ github.event_name == 'release' }} + build-args: | + APP_ENV=prod + tags: | + ghcr.io/mindleaps/tracker/mindleaps-tracker:latest + ghcr.io/mindleaps/tracker/mindleaps-tracker:${{ github.event.release.tag_name }} \ No newline at end of file