Skip to content

Commit

Permalink
Build images for multiple platforms (amd64/arm64)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrekkr committed Feb 24, 2024
1 parent 422c1e7 commit f8814ca
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,6 @@ jobs:
name: Build And Release
runs-on: ubuntu-22.04
steps:
- name: Cleanup untagged images
env:
GH_TOKEN: ${{ github.token }}
run: |
name=salesforce-archivist
to_delete=$(
gh api "/user/packages/container/${name}/versions" \
--jq '.[] | select(.metadata.container.tags==[]) | .id'
)
if [[ -z $to_delete ]]; then
echo "No untagged images found"
exit 0
fi
while read -r id; do
echo "Deleting untagged image id: ${id}"
gh api -X DELETE "/user/packages/container/${name}/versions/${id}";
done <<< "$to_delete"
exit 1
- name: Calculate params
id: params
run: |
Expand Down Expand Up @@ -90,9 +69,20 @@ jobs:
cache-to: type=gha,mode=max,scope=archivist

- name: Cleanup untagged images
env:
GH_TOKEN: ${{ github.token }}
run: |
name=salesforce-archivist
to_delete=$(
gh api "/user/packages/container/${name}/versions" \
--jq '.[] | select(.metadata.container.tags==[]) | .id'
)
if [[ -z $to_delete ]]; then
echo "No untagged images found"
exit 0
fi
while read -r id; do
echo "Deleting untagged image id: ${id}"
gh api -X DELETE "/user/packages/container/${name}/versions/${id}";
done <<< "$(gh api "/user/packages/container/${name}/versions" --jq '.[] | select(.metadata.container.tags==[]) | .id')"
done <<< "$to_delete"

0 comments on commit f8814ca

Please sign in to comment.