Publish PR build #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Publish PR build | |
on: # yamllint disable-line rule:truthy | |
workflow_run: | |
workflows: | |
- "PR build" | |
types: | |
- completed | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
env: | |
RUN_ID: ${{ github.event.workflow_run.id }} | |
steps: | |
- name: Download PR build artifact | |
id: download-pr-artifact | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh run --repo ${{ github.repository }} download ${RUN_ID} | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Publish EVE | |
run: | | |
echo "${{ secrets.DOCKERHUB_TOKEN }}" |\ | |
docker login -u evebuild --password-stdin | |
find . -name '*.tar' -exec docker load --input {} \; | |
docker image push --all-tags evebuild/danger | |
# no manifest for riscv64 for now | |
IMGS=$(docker images --format "{{.Repository}}:{{.Tag}}" evebuild/danger | grep -v 'riscv64$' | sed -r 's/.{6}$//' | sort -u) | |
for i in ${IMGS}; do | |
docker manifest create "$i" --amend "$i-arm64" --amend "$i-amd64" | |
docker manifest push "$i" | |
done |