Skip to content
Merged
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
28 changes: 20 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,31 @@ name: Build and Publish Docker Image
on:
release:
types: [published]
workflow_dispatch:

jobs:
build_image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v1
- uses: docker/build-push-action@v1
env:
DOCKER_BUILDKIT: 1
Copy link
Member

Choose a reason for hiding this comment

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

You sure we dont need this?

- 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
build_args: APP_ENV=prod
tag_with_ref: true

- 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 }}