| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- name: 构建lite镜像
- on:
- push:
- tags:
- - v*.*.*
- - v*.*-Beta*
- - v*.*-ExeBeta*
- workflow_dispatch:
- jobs:
- build:
- runs-on: ubuntu-latest
- if: "!contains(github.ref, 'ExeBeta')"
- name: 构建lite镜像
- steps:
- -
- name: Checkout
- uses: actions/checkout@master
-
- -
- name: Prepare
- id: prepare
- run: |
- echo "::set-output name=version::${GITHUB_REF:10}"
- echo "version=${GITHUB_REF:10}"
- -
- name: Set Up QEMU
- uses: docker/setup-qemu-action@v2
- -
- name: Set Up Buildx
- uses: docker/setup-buildx-action@v2
- -
- name: Login DockerHub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- -
- name: Go Build
- working-directory: docker
- run: |
- docker run --rm -e VERSION=${{ steps.prepare.outputs.version }} -v $(pwd)/go:/root/go -v $(pwd)/lite-init.sh:/init.sh --entrypoint "/init.sh" nevinee/csf-cross-builder
- -
- name: Docker Buildx Latest Image
- if: "!contains(steps.prepare.outputs.version, 'Beta')"
- uses: docker/build-push-action@v3
- with:
- context: docker
- file: docker/lite-release.Dockerfile
- platforms: |
- linux/386
- linux/amd64
- linux/arm64
- linux/arm/v7
- push: true
- build-args: |
- VERSION=${{ steps.prepare.outputs.version }}
- tags: |
- ${{ secrets.DOCKER_USERNAME }}/chinesesubfinder:${{ steps.prepare.outputs.version }}-lite
- ${{ secrets.DOCKER_USERNAME }}/chinesesubfinder:latest-lite
- -
- name: Docker Buildx Beta Image
- if: contains(steps.prepare.outputs.version, 'Beta')
- uses: docker/build-push-action@v3
- with:
- context: docker
- file: docker/lite-release.Dockerfile
- platforms: |
- linux/386
- linux/amd64
- linux/arm64
- linux/arm/v7
- push: true
- build-args: |
- VERSION=${{ steps.prepare.outputs.version }}
- tags: |
- ${{ secrets.DOCKER_USERNAME }}/chinesesubfinder:${{ steps.prepare.outputs.version }}-lite
|