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:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
archlinux:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -25,29 +25,24 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
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
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: archlinux
|
context: archlinux
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: medzik/android-sdk:archlinux
|
tags: |
|
||||||
|
medzik/android-sdk:archlinux
|
||||||
|
ghcr.io/medzikuser/android-sdk:archlinux
|
||||||
|
|
||||||
ubuntu:
|
- name: Build and push Docker image (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
|
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ubuntu
|
context: ubuntu
|
||||||
|
@ -55,3 +50,5 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
medzik/android-sdk:ubuntu
|
medzik/android-sdk:ubuntu
|
||||||
medzik/android-sdk:latest
|
medzik/android-sdk:latest
|
||||||
|
ghcr.io/medzikuser/android-sdk:ubuntu
|
||||||
|
ghcr.io/medzikuser/android-sdk:latest
|
||||||
|
|
Loading…
Reference in a new issue