Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alcohol committed Jun 14, 2024
1 parent 0c18de5 commit abffcc6
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions .github/workflows/v2-lts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
DOCKERHUB_SLUG: composer/composer
ECR_SLUG: public.ecr.aws/u0u1j5s3/composer
GHCR_SLUG: ghcr.io/composer/docker
DIRECTORY: 2.2

jobs:

Expand All @@ -36,6 +37,14 @@ jobs:

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Determine Composer version from Dockerfile
uses: ./.github/actions/determine-composer-version
with:
working-directory: ${{ env.DIRECTORY }}

- name: Docker metadata (full image)
id: meta-full
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -95,12 +104,9 @@ jobs:
#- linux/riscv64
#- linux/s390x

env:
directory: 2.2

defaults:
run:
working-directory: ${{ env.directory }}
working-directory: ${{ env.DIRECTORY }}

steps:

Expand All @@ -112,11 +118,6 @@ jobs:
platform=${{ matrix.platform }}
echo "PLATFORM_SLUG=${platform//\//-}" >> $GITHUB_ENV
- name: Determine Composer version from Dockerfile
uses: ./.github/actions/determine-composer-version
with:
working-directory: ${{ env.directory }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -129,7 +130,7 @@ jobs:
id: build-full
uses: docker/build-push-action@v5
with:
context: ${{ env.directory }}
context: ${{ env.DIRECTORY }}
load: true
pull: true
no-cache: true
Expand All @@ -143,7 +144,7 @@ jobs:
id: build-bin
uses: docker/build-push-action@v5
with:
context: ${{ env.directory }}
context: ${{ env.DIRECTORY }}
load: true
pull: true
no-cache: true
Expand Down Expand Up @@ -222,12 +223,22 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create manifest list and push
working-directory: /tmp/digests
- name: Create manifest list for full image and push
working-directory: /tmp/digests/full
run: |
docker buildx imagetools create --dry-run $(jq -cr '.tags | map(select(startswith("${{ env.DOCKERHUB_SLUG }}")) | "-t " + .) | join(" ")' <<< "${{ needs.prepare.outputs.full-json }}") \
$(printf '${{ env.DOCKERHUB_SLUG }}@sha256:%s ' *)
docker buildx imagetools create --dry-run $(jq -cr '.tags | map(select(startswith("${{ env.ECR_SLUG }}")) | "-t " + .) | join(" ")' <<< "${{ needs.prepare.outputs.full-json }}") \
$(printf '${{ env.ECR_SLUG }}@sha256:%s ' *)
docker buildx imagetools create --dry-run $(jq -cr '.tags | map(select(startswith("${{ env.GHCR_SLUG }}")) | "-t " + .) | join(" ")' <<< "${{ needs.prepare.outputs.full-json }}") \
$(printf '${{ env.GHCR_SLUG }}@sha256:%s ' *)
- name: Create manifest list for binary-only image and push
working-directory: /tmp/digests/bin
run: |
docker buildx imagetools create --dry-run $(jq -cr '.target."docker-metadata-action".tags | map(select(startswith("${{ env.DOCKERHUB_SLUG }}")) | "-t " + .) | join(" ")' /tmp/bake-meta.json) \
docker buildx imagetools create --dry-run $(jq -cr '.tags | map(select(startswith("${{ env.DOCKERHUB_SLUG }}")) | "-t " + .) | join(" ")' <<< "${{ needs.prepare.outputs.bin-json }}") \
$(printf '${{ env.DOCKERHUB_SLUG }}@sha256:%s ' *)
docker buildx imagetools create --dry-run $(jq -cr '.target."docker-metadata-action".tags | map(select(startswith("${{ env.ECR_SLUG }}")) | "-t " + .) | join(" ")' /tmp/bake-meta.json) \
docker buildx imagetools create --dry-run $(jq -cr '.tags | map(select(startswith("${{ env.ECR_SLUG }}")) | "-t " + .) | join(" ")' <<< "${{ needs.prepare.outputs.bin-json }}") \
$(printf '${{ env.ECR_SLUG }}@sha256:%s ' *)
docker buildx imagetools create --dry-run $(jq -cr '.target."docker-metadata-action".tags | map(select(startswith("${{ env.GHCR_SLUG }}")) | "-t " + .) | join(" ")' /tmp/bake-meta.json) \
docker buildx imagetools create --dry-run $(jq -cr '.tags | map(select(startswith("${{ env.GHCR_SLUG }}")) | "-t " + .) | join(" ")' <<< "${{ needs.prepare.outputs.bin-json }}") \
$(printf '${{ env.GHCR_SLUG }}@sha256:%s ' *)

0 comments on commit abffcc6

Please sign in to comment.