mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-26 10:52:21 +00:00
286
.github/workflows/docker.yml
vendored
286
.github/workflows/docker.yml
vendored
@@ -106,7 +106,7 @@ jobs:
|
||||
with:
|
||||
platforms: linux/386
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:latest
|
||||
tags: asdlokj1qpi23/subconverter:latest-x86
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
outputs: type=image,push=true
|
||||
@@ -127,7 +127,7 @@ jobs:
|
||||
with:
|
||||
platforms: linux/386
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-x86
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Save digest
|
||||
@@ -144,150 +144,150 @@ jobs:
|
||||
name: digest_386
|
||||
path: /tmp/digest.txt
|
||||
|
||||
armv7_build:
|
||||
name: Build ARMv7 Image
|
||||
runs-on: [self-hosted, linux, ARM]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get commit SHA
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and export
|
||||
id: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:latest-armv7
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
result-encoding: string
|
||||
|
||||
- name: Build release and export
|
||||
id: build_rel
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
||||
build-args: |
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Save digest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Save release digest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digest_armv7
|
||||
path: /tmp/digest.txt
|
||||
|
||||
arm64_build:
|
||||
name: Build ARM64 Image
|
||||
runs-on: [self-hosted, linux, ARM64]
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Get commit SHA
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and export
|
||||
id: build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:latest-arm64
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/github-script@v6
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
result-encoding: string
|
||||
|
||||
- name: Build release and export
|
||||
id: build_rel
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
||||
build-args: |
|
||||
THREADS=4
|
||||
outputs: type=image,push=true
|
||||
|
||||
- name: Save digest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Save release digest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digest_arm64
|
||||
path: /tmp/digest.txt
|
||||
# armv7_build:
|
||||
# name: Build ARMv7 Image
|
||||
# runs-on: [self-hosted, linux, ARM]
|
||||
# steps:
|
||||
# - name: Checkout base
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
#
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
#
|
||||
# - name: Docker login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
#
|
||||
# - name: Get commit SHA
|
||||
# id: vars
|
||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
#
|
||||
# - name: Build and export
|
||||
# id: build
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm/v7
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:latest-armv7
|
||||
# build-args: |
|
||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Replace tag without `v`
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: actions/github-script@v6
|
||||
# id: version
|
||||
# with:
|
||||
# script: |
|
||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
# result-encoding: string
|
||||
#
|
||||
# - name: Build release and export
|
||||
# id: build_rel
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm/v7
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-armv7
|
||||
# build-args: |
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Save digest
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Save release digest
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: digest_armv7
|
||||
# path: /tmp/digest.txt
|
||||
#
|
||||
# arm64_build:
|
||||
# name: Build ARM64 Image
|
||||
# runs-on: [self-hosted, linux, ARM64]
|
||||
# steps:
|
||||
# - name: Checkout base
|
||||
# uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
#
|
||||
# - name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v2
|
||||
#
|
||||
# - name: Docker login
|
||||
# uses: docker/login-action@v2
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
#
|
||||
# - name: Get commit SHA
|
||||
# id: vars
|
||||
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
#
|
||||
# - name: Build and export
|
||||
# id: build
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm64
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:latest-arm64
|
||||
# build-args: |
|
||||
# SHA=${{ steps.vars.outputs.sha_short }}
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Replace tag without `v`
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: actions/github-script@v6
|
||||
# id: version
|
||||
# with:
|
||||
# script: |
|
||||
# return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
# result-encoding: string
|
||||
#
|
||||
# - name: Build release and export
|
||||
# id: build_rel
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# uses: docker/build-push-action@v3
|
||||
# with:
|
||||
# platforms: linux/arm64
|
||||
# context: scripts/
|
||||
# tags: asdlokj1qpi23/subconverter:${{steps.version.outputs.result}}-arm64
|
||||
# build-args: |
|
||||
# THREADS=4
|
||||
# outputs: type=image,push=true
|
||||
#
|
||||
# - name: Save digest
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
# run: echo ${{ steps.build.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Save release digest
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# run: echo ${{ steps.build_rel.outputs.digest }} > /tmp/digest.txt
|
||||
#
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: digest_arm64
|
||||
# path: /tmp/digest.txt
|
||||
|
||||
build:
|
||||
name: Build
|
||||
needs: [amd64_build, x86_build, armv7_build, arm64_build]
|
||||
# needs: [amd64_build, x86_build]
|
||||
# needs: [amd64_build, x86_build, armv7_build, arm64_build]
|
||||
needs: [amd64_build, x86_build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
|
||||
Reference in New Issue
Block a user