summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg <supahgreg@users.noreply.github.com>2025-10-09 07:30:19 -0500
committerGitHub <noreply@github.com>2025-10-09 07:30:19 -0500
commit2b5877435f8baf911038f7f21b35cfbe660d8b86 (patch)
treeb94ee48a3baf7306f1da6633c3b2c8a2a3942871
parentab0aabf8548c206f3f624de5451a9b6abbde90be (diff)
parentbfb30bbd2a6d4739b40432b1c60deb378eb3d4e0 (diff)
Merge pull request #23 from tt-rss/feature/publish-to-ghcr
Also publish images to GitHub Container Registry (ghcr.io)
-rw-r--r--.github/workflows/publish.yml26
1 files changed, 20 insertions, 6 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 744bb1488..1ef46b631 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -27,20 +27,25 @@ jobs:
test-php:
uses: ./.github/workflows/php-code-quality.yml
- publish-dockerhub:
- name: Publish ${{ matrix.image.name }} to Docker Hub
+ publish:
+ name: Publish Docker image ${{ matrix.image.name }}
needs:
- test-php
runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ packages: write
strategy:
matrix:
image:
- name: app
dockerfile: ./.docker/app/Dockerfile
- repository: supahgreg/tt-rss
+ repository_dockerhub: supahgreg/tt-rss
+ repository_ghcr: ghcr.io/tt-rss/tt-rss
- name: web-nginx
dockerfile: ./.docker/web-nginx/Dockerfile
- repository: supahgreg/tt-rss-web-nginx
+ repository_dockerhub: supahgreg/tt-rss-web-nginx
+ repository_ghcr: ghcr.io/tt-rss/tt-rss-web-nginx
steps:
- name: Check out code
@@ -52,6 +57,13 @@ jobs:
- name: Get commit short SHA
run: echo "COMMIT_SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+ - name: Log in to GitHub Container Registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
@@ -62,7 +74,9 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
- images: ${{ matrix.image.repository }}
+ images: |
+ ${{ matrix.image.repository_dockerhub }}
+ ${{ matrix.image.repository_ghcr }}
tags: |
# update 'latest'
type=raw,value=latest
@@ -75,7 +89,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- - name: Build and push to Docker Hub
+ - name: Build and push to image registries
id: push
uses: docker/build-push-action@v6
with: