refactor docker ci
This commit is contained in:
+14
-11
@@ -254,8 +254,6 @@ jobs:
|
||||
if-no-files-found: error
|
||||
build-docker:
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
PLATFORMS: linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
|
||||
permissions:
|
||||
attestations: write
|
||||
id-token: write
|
||||
@@ -269,19 +267,23 @@ jobs:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
tags: |
|
||||
type=raw,value=${{ github.sha }}
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
- id: push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/monosans/proxy-scraper-checker:${{ github.sha }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
- uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
@@ -295,7 +297,7 @@ jobs:
|
||||
run: |
|
||||
echo "# syntax=docker.io/docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/monosans/proxy-scraper-checker:${{ github.sha }}
|
||||
FROM ghcr.io/${{ github.repository }}:${{ github.sha }}
|
||||
|
||||
ARG \\
|
||||
UID=1000 \\
|
||||
@@ -320,7 +322,8 @@ jobs:
|
||||
if: ${{ always() && github.event_name == 'pull_request' }}
|
||||
needs:
|
||||
- build
|
||||
- build-docker
|
||||
# Too slow
|
||||
# - build-docker
|
||||
- clippy
|
||||
- pre-commit
|
||||
- rustfmt
|
||||
|
||||
Reference in New Issue
Block a user