From 052dc6ac04349cc2904eef76a6d64798350f60e5 Mon Sep 17 00:00:00 2001 From: Alexander Linder Date: Sat, 27 Jun 2026 20:44:40 +0200 Subject: [PATCH] Adjust publishing workflow --- .github/workflows/docker-image.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 6b4601733..5a6779bc2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,6 +11,9 @@ on: jobs: build_and_push: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout code uses: actions/checkout@v4 @@ -19,7 +22,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ${{ vars.DOCKER_REPOSITORY || 'ghostfolio/ghostfolio' }} + images: | + ${{ vars.DOCKER_REPOSITORY || 'ghostfolio/ghostfolio' }} + ghcr.io/${{ github.repository }} tags: | type=semver,pattern={{major}} type=semver,pattern={{version}} @@ -38,6 +43,14 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Login to GHCR + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push uses: docker/build-push-action@v3 with: