forked from lf-edge/eve
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.2 KB
/
danger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
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