mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-03-20 11:57:46 +08:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Build(Docker)
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '\d+\.\d+\.\d+'
|
|
pull_request:
|
|
tags:
|
|
- '\d+\.\d+\.\d+'
|
|
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Create Version info
|
|
working-directory: ./src
|
|
run: |
|
|
echo "VERSION = '$GITHUB_REF_NAME'" > module/__version__.py
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
-
|
|
name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64,linux/arm
|
|
push: true
|
|
tags: |
|
|
estrellaxd/auto_bangumi:latest
|
|
estrellaxd/auto_bangumi:${{ github.sha }}
|
|
estrellaxd/auto_bangumi:${{ github.ref }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|