ci: only build x86_64 docker images
Only build x86_64 docker images because trying to build everything is timing out.
This commit is contained in:
parent
7948ce2601
commit
c5799dad20
|
@ -41,9 +41,6 @@ jobs:
|
|||
run: |
|
||||
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2.1.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.5.0
|
||||
|
@ -51,23 +48,6 @@ jobs:
|
|||
version: latest
|
||||
driver-opts: network=host
|
||||
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Get platforms
|
||||
uses: actions/github-script@v6.4.1
|
||||
id: platforms
|
||||
env:
|
||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const script = require(`${process.env.GITHUB_WORKSPACE}/.github/getDockerPlatforms.js`)
|
||||
return script("${{ matrix.dockerfile }}", "${{ steps.buildx.outputs.platforms }}");
|
||||
|
||||
- name: Platforms
|
||||
run: echo ${{ steps.platforms.outputs.result }}
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3.3.1
|
||||
id: cache
|
||||
|
@ -90,7 +70,6 @@ jobs:
|
|||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: ./${{ matrix.dockerfile}}
|
||||
platforms: ${{ steps.platforms.outputs.result }}
|
||||
tags: ${{ matrix.docker-image }}:${{ github.sha }}
|
||||
labels: |
|
||||
org.opencontainers.image.title=${{ fromJson(steps.repo.outputs.result).name }}
|
||||
|
@ -102,14 +81,3 @@ jobs:
|
|||
org.opencontainers.image.licenses=${{ fromJson(steps.repo.outputs.result).license.spdx_id }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
|
||||
|
||||
- name: Inspect
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ matrix.docker-image }}:${{ github.sha }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker-build.outputs.digest }}
|
||||
|
||||
- name: Dump context
|
||||
if: always()
|
||||
uses: crazy-max/ghaction-dump-context@v2.0.0
|
||||
|
|
|
@ -141,32 +141,12 @@ jobs:
|
|||
run: |
|
||||
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2.1.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.5.0
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Available platforms
|
||||
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Get platforms
|
||||
uses: actions/github-script@v6.4.1
|
||||
id: platforms
|
||||
env:
|
||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const script = require(`${process.env.GITHUB_WORKSPACE}/.github/getDockerPlatforms.js`)
|
||||
return script("${{ matrix.dockerfile }}", "${{ steps.buildx.outputs.platforms }}");
|
||||
|
||||
- name: Platforms
|
||||
run: echo ${{ steps.platforms.outputs.result }}
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3.3.1
|
||||
id: cache
|
||||
|
@ -195,7 +175,6 @@ jobs:
|
|||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: ./${{ matrix.dockerfile}}
|
||||
platforms: ${{ steps.platforms.outputs.result }}
|
||||
tags: |
|
||||
${{ matrix.docker-image }}:latest
|
||||
${{ matrix.docker-image }}:${{ needs.release-semantic.outputs.release-version }}
|
||||
|
@ -221,14 +200,3 @@ jobs:
|
|||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
# repository: ${{ matrix.docker-image }}
|
||||
|
||||
- name: Inspect
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ matrix.docker-image }}:${{ needs.release-semantic.outputs.release-version }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker-build.outputs.digest }}
|
||||
|
||||
- name: Dump context
|
||||
if: always()
|
||||
uses: crazy-max/ghaction-dump-context@v2.0.0
|
||||
|
|
Loading…
Reference in New Issue