mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 12:07:07 +03:00
Auto build container
This commit is contained in:
50
.github/workflows/docker-build.yml
vendored
Normal file
50
.github/workflows/docker-build.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
# 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
|
||||||
|
secrets:
|
||||||
|
GH_TOKEN:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_container:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/${{ inputs.username }}/${{ inputs.name }}
|
||||||
|
tags: |
|
||||||
|
type-raw,value=alpine
|
||||||
|
flavor: |
|
||||||
|
latest=true
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GH_TOKEN }}
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
with:
|
||||||
|
platforms: arm,arm64
|
||||||
|
- name: Set up buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
- name: push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: ./build/${{ inputs.name }}
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
15
.github/workflows/sb-container.yml
vendored
Normal file
15
.github/workflows/sb-container.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: sb-runner
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: ./.github/workflows/docker-build.yml
|
||||||
|
with:
|
||||||
|
name: "sb-container"
|
||||||
|
username: "ajayyy"
|
||||||
|
secrets:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user