summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2020-10-28 21:18:07 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2020-10-28 21:18:07 -0700
commita37a2dd04373ad71f5ce096a89c4f7ec9849f397 (patch)
treea20a6e22630c567c07179a4658b027eaa522b6f7
parent519fbcf581616db83696dc8242d9c7de55a598d8 (diff)
downloadv2-a37a2dd04373ad71f5ce096a89c4f7ec9849f397.tar.gz
v2-a37a2dd04373ad71f5ce096a89c4f7ec9849f397.tar.zst
v2-a37a2dd04373ad71f5ce096a89c4f7ec9849f397.zip
Publish Docker images to GitHub Container Registry
-rw-r--r--.github/workflows/docker.yml14
1 files changed, 10 insertions, 4 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 0796852f..2a7aa5ca 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -6,7 +6,7 @@ on:
tags:
- '*.*.*'
jobs:
- multi:
+ docker-images:
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -21,13 +21,12 @@ jobs:
DOCKER_VERSION=dev
if [ "${{ github.event_name }}" = "schedule" ]; then
DOCKER_VERSION=nightly
+ TAGS="${DOCKER_IMAGE}:${DOCKER_VERSION},ghcr.io/${DOCKER_IMAGE}:${DOCKER_VERSION}"
elif [[ $GITHUB_REF == refs/tags/* ]]; then
DOCKER_VERSION=${GITHUB_REF#refs/tags/}
+ TAGS="${DOCKER_IMAGE}:${DOCKER_VERSION},ghcr.io/${DOCKER_IMAGE}:${DOCKER_VERSION},${DOCKER_IMAGE}:latest,ghcr.io/${DOCKER_IMAGE}:latest"
fi
- TAGS="${DOCKER_IMAGE}:${DOCKER_VERSION}"
- echo ::set-output name=version::${DOCKER_VERSION}
echo ::set-output name=tags::${TAGS}
- echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@@ -41,6 +40,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v1
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.CR_PAT }}
+
- name: Build and push
uses: docker/build-push-action@v2
with: