Files
Hippy/.github/workflows/build_android_release_image.yml
T
2021-11-12 16:56:37 +08:00

42 lines
1.1 KiB
YAML

name: '[android] build release image'
on:
workflow_dispatch:
inputs:
tag:
description: 'TAG'
default: 'latest'
required: true
push:
branches:
- master
- main
tags-ignore:
- '**'
paths:
- 'docker/android-release/Dockerfile'
jobs:
push_to_registry:
name: Push docker image
runs-on: [self-hosted, linux, trusted]
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get repo owner(in lowercase)
id: get_owner
uses: ASzc/change-string-case-action@v2
with:
string: ${{ github.repository_owner }}
- name: Push to ghcr.io
uses: docker/build-push-action@v2
with:
context: docker/android-release
push: true
tags: ghcr.io/${{ steps.get_owner.outputs.lowercase }}/android-release:${{ github.event.inputs.tag || 'latest' }}