mirror of
https://github.com/MedzikUser/docker-android-sdk
synced 2024-08-15 03:18:15 +00:00
add publish to GitHub Container Registry
This commit is contained in:
parent
a746a54e53
commit
f19d57b956
1 changed files with 16 additions and 19 deletions
35
.github/workflows/docker-publish.yml
vendored
35
.github/workflows/docker-publish.yml
vendored
|
@ -11,7 +11,7 @@ on:
|
|||
pull_request:
|
||||
|
||||
jobs:
|
||||
archlinux:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -25,29 +25,24 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
- 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 (archlinux)
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: archlinux
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: medzik/android-sdk:archlinux
|
||||
tags: |
|
||||
medzik/android-sdk:archlinux
|
||||
ghcr.io/medzikuser/android-sdk:archlinux
|
||||
|
||||
ubuntu:
|
||||
needs: archlinux
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push Docker image (ubuntu)
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ubuntu
|
||||
|
@ -55,3 +50,5 @@ jobs:
|
|||
tags: |
|
||||
medzik/android-sdk:ubuntu
|
||||
medzik/android-sdk:latest
|
||||
ghcr.io/medzikuser/android-sdk:ubuntu
|
||||
ghcr.io/medzikuser/android-sdk:latest
|
||||
|
|
Loading…
Reference in a new issue