Skip to content

Commit

Permalink
Upload Docker images to ghcr.io (#2053)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored Oct 7, 2021
1 parent 12a15fb commit 19e8c97
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,20 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: github.event_name != 'pull_request'
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: nginx/nginx-ingress
images: |
nginx/nginx-ingress
ghcr.io/nginxinc/kubernetes-ingress
flavor: suffix=${{ matrix.image != 'debian' && '-' || '' }}${{ matrix.image != 'debian' && matrix.image != 'opentracing' && matrix.image || '' }}${{ matrix.image == 'opentracing' && 'ot' || '' }},onlatest=true
tags: |
type=edge
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/update-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ matrix.needs-updating == 'true' }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.needs-updating == 'true' }}
- name: Get short tag
id: tag
run: |
Expand All @@ -182,7 +189,9 @@ jobs:
id: meta
uses: docker/metadata-action@v3
with:
images: nginx/nginx-ingress
images: |
nginx/nginx-ingress
ghcr.io/nginxinc/kubernetes-ingress
flavor: |
latest=true
suffix=${{ matrix.image != 'debian' && '-' || '' }}${{ matrix.image != 'debian' && matrix.image != 'opentracing' && matrix.image || '' }}${{ matrix.image == 'opentracing' && 'ot' || '' }},onlatest=true
Expand Down

0 comments on commit 19e8c97

Please sign in to comment.