SponsorBlockServer/.github/workflows/docker-build.yml

46 lines
No EOL
1.1 KiB
YAML

# Based on https://github.com/ajayyy/sb-mirror/blob/main/.github/workflows/docker-build.yml
name: multi-build-docker
on:
workflow_call:
inputs:
name:
required: true
type: string
username:
required: true
type: string
folder:
required: true
type: string
secrets:
GH_TOKEN:
required: true
jobs:
build_container:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ inputs.username }}/${{ inputs.name }}
tags: |
type-raw,value=alpine
flavor: |
latest=true
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: push
uses: docker/build-push-action@v3
with:
context: ${{ inputs.folder }}
push: true
tags: ${{ steps.meta.outputs.tags }}