summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-09 12:19:17 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-09 12:27:58 +0000
commit5f0850a9c203ad1d69fef126b70d61ba2880407d (patch)
treed5287ba6284ffdaa4d1395a3c37dcb53cdbd35cf
parentab0aabf8548c206f3f624de5451a9b6abbde90be (diff)
Also publish images to GitHub Container Registry (ghcr.io). tt-rss/tt-rss#11
-rw-r--r--.github/workflows/publish.yml24
1 files changed, 18 insertions, 6 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 744bb1488..324806211 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -21,14 +21,15 @@ on:
permissions:
contents: read
+ packages: write
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
@@ -37,10 +38,12 @@ jobs:
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 +55,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 +72,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 +87,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: