add ghcr.io push to canary docker builds
This commit is contained in:
parent
2fe78d8b0f
commit
d4b0793746
14
.github/workflows/docker-publish-canary.yml
vendored
14
.github/workflows/docker-publish-canary.yml
vendored
@ -6,6 +6,9 @@ on:
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -19,7 +22,9 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: moonrailgun/tianji
|
||||
images: |
|
||||
moonrailgun/tianji
|
||||
ghcr.io/moonrailgun/tianji
|
||||
tags: |
|
||||
type=sha
|
||||
- name: Login to DockerHub
|
||||
@ -28,6 +33,13 @@ jobs:
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Log into ghcr.io registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build and push
|
||||
|
Loading…
Reference in New Issue
Block a user