Skip to content

Commit

Permalink
ci: Push beta Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Aug 16, 2023
1 parent cbf5804 commit df8bce6
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 @@ -77,6 +77,27 @@ jobs:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_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"
IMAGES+=("$DEST")
done \
< <(docker image ls --format=json | \
yq --input-format=json --no-doc '[.]' | \
yq --output-format=tsv '.[] |
select(.Repository == strenv(REPO)) |
[
.Repository + ":" + .Tag,
.Repository + ":debug-" + (.Tag | sub(".*-", ""))
]
')
docker manifest create "$REPO:debug" "${IMAGES[@]}"
docker manifest push "$REPO:debug"
- uses: actions/upload-artifact@v3
with:
name: dist
Expand Down

0 comments on commit df8bce6

Please sign in to comment.