Move dev images to ghcr

This commit is contained in:
Xiaonan Shen 2020-11-22 04:09:59 -08:00
parent 139a97b58f
commit 3eaa78ae03
No known key found for this signature in database
GPG Key ID: 211BF560D12417F5
2 changed files with 18 additions and 4 deletions

View File

@ -15,7 +15,7 @@ on:
env: env:
DOCKER_REPO: shenxn/protonmail-bridge DOCKER_REPO: shenxn/protonmail-bridge
DOCKER_REPO_DEV: shenxn/protonmail-bridge-dev DOCKER_REPO_DEV: ghcr.io/shenxn/protonmail-bridge-dev
jobs: jobs:
build: build:
@ -67,10 +67,17 @@ jobs:
sarif_file: ${{ steps.scan.outputs.sarif }} sarif_file: ${{ steps.scan.outputs.sarif }}
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
with: with:
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Push image - name: Push image
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:

View File

@ -15,7 +15,7 @@ on:
env: env:
DOCKER_REPO: shenxn/protonmail-bridge DOCKER_REPO: shenxn/protonmail-bridge
DOCKER_REPO_DEV: shenxn/protonmail-bridge-dev DOCKER_REPO_DEV: ghcr.io/shenxn/protonmail-bridge-dev
jobs: jobs:
deb: deb:
@ -57,10 +57,17 @@ jobs:
sarif_file: ${{ steps.scan.outputs.sarif }} sarif_file: ${{ steps.scan.outputs.sarif }}
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
with: with:
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/dev' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Push image - name: Push image
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with: