only build docker for x86
This commit is contained in:
+80
-19
@@ -253,6 +253,42 @@ jobs:
|
||||
name: proxy-scraper-checker-${{ matrix.target }}
|
||||
path: dist/
|
||||
if-no-files-found: error
|
||||
build-docker-arm64:
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
runs-on: ubuntu-24.04-arm
|
||||
permissions:
|
||||
attestations: write
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
# - id: meta
|
||||
# uses: docker/metadata-action@v5
|
||||
# with:
|
||||
# images: ghcr.io/${{ github.repository }}
|
||||
# tags: |
|
||||
# type=raw,value=${{ github.sha }}
|
||||
# - uses: docker/login-action@v3
|
||||
# with:
|
||||
# registry: ghcr.io
|
||||
# username: ${{ github.actor }}
|
||||
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
# - id: push
|
||||
# uses: docker/build-push-action@v6
|
||||
# with:
|
||||
# cache-from: type=gha
|
||||
# cache-to: type=gha,mode=max
|
||||
# labels: ${{ steps.meta.outputs.labels }}
|
||||
# platforms: linux/amd64,linux/386
|
||||
# push: true
|
||||
# tags: ${{ steps.meta.outputs.tags }}
|
||||
# - uses: actions/attest-build-provenance@v2
|
||||
# with:
|
||||
# subject-digest: ${{ steps.push.outputs.digest }}
|
||||
# subject-name: ghcr.io/${{ github.repository }}
|
||||
# push-to-registry: true
|
||||
build-docker:
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -260,39 +296,29 @@ jobs:
|
||||
attestations: write
|
||||
id-token: write
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- linux/386
|
||||
- linux/amd64
|
||||
- linux/arm/v7
|
||||
- linux/arm64/v8
|
||||
- linux/ppc64le
|
||||
- linux/s390x
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=raw,value=${{ github.sha }}
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- id: push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: ${{ matrix.platform }}
|
||||
platforms: linux/amd64,linux/386
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
- uses: actions/attest-build-provenance@v2
|
||||
@@ -300,10 +326,45 @@ jobs:
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
subject-name: ghcr.io/${{ github.repository }}
|
||||
push-to-registry: true
|
||||
upload-docker:
|
||||
upload-docker-src:
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- arm-v7
|
||||
- arm64-v8
|
||||
- ppc64le
|
||||
- s390x
|
||||
permissions:
|
||||
attestations: write
|
||||
id-token: write
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- run: mkdir -p dist
|
||||
- run: echo -n '${{ github.sha }}' > dist/commit-sha.txt
|
||||
- run: mv {src,Cargo.lock,Cargo.toml,compose.yaml,config.toml,Dockerfile,LICENSE} dist/
|
||||
- uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-path: dist
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: proxy-scraper-checker-docker-${{ matrix.platform }}
|
||||
path: dist/
|
||||
if-no-files-found: error
|
||||
upload-docker-prebuilt:
|
||||
needs:
|
||||
- build-docker
|
||||
permissions:
|
||||
attestations: write
|
||||
id-token: write
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- amd64
|
||||
- "386"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -335,7 +396,7 @@ jobs:
|
||||
subject-path: dist
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: proxy-scraper-checker-docker
|
||||
name: proxy-scraper-checker-docker-${{ matrix.platform }}
|
||||
path: dist/
|
||||
if-no-files-found: error
|
||||
check:
|
||||
|
||||
Reference in New Issue
Block a user