ci: push to multi registries

This commit is contained in:
Medzik 2022-02-16 14:52:47 +01:00
parent 8a6febf82b
commit 3eec37d146
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
1 changed files with 13 additions and 1 deletions

View File

@ -25,9 +25,21 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./base
push: ${{ github.event_name != 'pull_request' }}
tags: medzik/archlinux:latest
tags: |
medzik/archlinux:latest
medzik/archlinux:base
ghcr.io/medzikuser/archlinux:latest
ghcr.io/medzikuser/archlinux:base