Skip to content

Commit

Permalink
ci(build): Add beta container image
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Mar 4, 2024
1 parent 7d96557 commit 4ecd2ca
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,27 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
- name: Push beta image
if: github.ref_name == 'main'
run: |
export REPO="$(tr '[[:upper:]]' '[[:lower:]]' <<< "ghcr.io/$GITHUB_REPOSITORY")"
IMAGES=()
while read -r SOURCE DEST; do
docker tag "$SOURCE" "$DEST"
docker push "$DEST"
IMAGES+=("$DEST")
done \
< <(docker image ls --format=json | \
yq --input-format=json --output-format=tsv '
select(.Repository == strenv(REPO)) |
[
.Repository + ":" + .Tag,
.Repository + ":beta-" + (.Tag | sub(".*-", ""))
]
')
docker manifest create "$REPO:beta" "${IMAGES[@]}"
docker manifest push "$REPO:beta"
- uses: actions/upload-artifact@v4
with:
name: dist
Expand Down

0 comments on commit 4ecd2ca

Please sign in to comment.