Skip to content

Commit

Permalink
touchup
Browse files Browse the repository at this point in the history
  • Loading branch information
emoruzzi committed Dec 2, 2024
1 parent 104ed5f commit fde9118
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ on:
- "./**"
- '!**/*.md'
pull_request:
# build and push anytime a pull request is opened or synchronized
branches:
- main
- devel
- build-runner # Remove this line before merging to 'main' or 'devel'
paths:
- ".github/workflows/release.yml"
- "./**"
Expand All @@ -50,8 +48,7 @@ on:
types:
- created
schedule:
# build and push nightly
- cron: "13 4 * * *"
- cron: "13 4 * * 1"

jobs:
ci:
Expand Down Expand Up @@ -119,14 +116,32 @@ jobs:
echo "IMAGE_TAG=${GITHUB_SHA::7}" >> $GITHUB_ENV
fi
- name: Build and push image
- name: Setup docker buildx
run: |
docker buildx create --name awx-ee-buildx
docker buildx use awx-ee-buildx
ansible-builder create -v3 --output-file=Dockerfile
- name: Build and push image linux/amd64
run: |
docker buildx build \
--platform=linux/amd64 \
--tag=${{ vars.IMAGE_REGISTRY_URL || 'ghcr.io' }}/${{ vars.IMAGE_REPOSITORY || github.repository }}:${{ env.IMAGE_TAG }}-amd64 \
--push \
context
- name: Build and push image linux/arm64
run: |
docker buildx build \
--platform=linux/arm64 \
--tag=${{ vars.IMAGE_REGISTRY_URL || 'ghcr.io' }}/${{ vars.IMAGE_REPOSITORY || github.repository }}:${{ env.IMAGE_TAG }}-arm64 \
--push \
--platform=linux/amd64,linux/arm64 \
--tag=${{ vars.IMAGE_REGISTRY_URL || 'ghcr.io' }}/${{ vars.IMAGE_REPOSITORY || github.repository }}:${{ env.IMAGE_TAG }} \
context
- name: Create and push multi-arch manifest
run: |
docker manifest create \
${{ vars.IMAGE_REGISTRY_URL || 'ghcr.io' }}/${{ vars.IMAGE_REPOSITORY || github.repository }}:${{ env.IMAGE_TAG }} \
--amend ${{ vars.IMAGE_REGISTRY_URL || 'ghcr.io' }}/${{ vars.IMAGE_REPOSITORY || github.repository }}:${{ env.IMAGE_TAG }}-amd64 \
--amend ${{ vars.IMAGE_REGISTRY_URL || 'ghcr.io' }}/${{ vars.IMAGE_REPOSITORY || github.repository }}:${{ env.IMAGE_TAG }}-arm64
docker manifest push ${{ vars.IMAGE_REGISTRY_URL || 'ghcr.io' }}/${{ vars.IMAGE_REPOSITORY || github.repository }}:${{ env.IMAGE_TAG }}

0 comments on commit fde9118

Please sign in to comment.