1+ name : Build syncoor docker image
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ repository :
7+ description : The source syncoor repository to build from
8+ default : ethpandaops/syncoor
9+ type : string
10+ required : true
11+ ref :
12+ description : The branch, tag or SHA to checkout and build from
13+ default : master
14+ type : string
15+ required : true
16+ docker_tag :
17+ description : Override target docker tag (defaults to the above source ref if left blank)
18+ type : string
19+ required : false
20+
21+ jobs :
22+ prepare :
23+ runs-on : ubuntu-latest
24+ outputs :
25+ platforms : ${{ steps.setup.outputs.platforms }}
26+ target_tag : ${{ steps.tag.outputs.docker_tag }}
27+ steps :
28+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+ - name : Prepare Matrix
30+ id : setup
31+ uses : ./.github/actions/prepare
32+ with :
33+ client : ' syncoor'
34+ - name : Generate target tag
35+ id : tag
36+ uses : ./.github/actions/docker-tag
37+ with :
38+ input : ${{ inputs.docker_tag || inputs.ref }}
39+ deploy :
40+ needs :
41+ - prepare
42+ runs-on : ${{ matrix.runner }}
43+ continue-on-error : true
44+ strategy :
45+ matrix :
46+ include : ${{fromJson(needs.prepare.outputs.platforms)}}
47+ outputs :
48+ git_commit_hash : ${{ steps.set_output.outputs.git_commit_hash }}
49+ steps :
50+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+ - uses : ./.github/actions/install-deps
52+ with :
53+ repository : ${{ inputs.repository }}
54+ - uses : ./.github/actions/deploy
55+ id : deploy
56+ with :
57+ source_repository : ${{ inputs.repository }}
58+ source_ref : ${{ inputs.ref }}
59+ target_tag : ${{ needs.prepare.outputs.target_tag }}-${{ matrix.slug }}
60+ target_repository : ethpandaops/syncoor
61+ platform : ${{ matrix.platform }}
62+
63+ DOCKER_USERNAME : " ${{ vars.DOCKER_USERNAME }}"
64+ DOCKER_PASSWORD : " ${{ secrets.DOCKER_PASSWORD }}"
65+ MACOS_PASSWORD : " ${{ secrets.MACOS_PASSWORD }}"
66+ GOPROXY : " ${{ vars.GOPROXY }}"
67+ HARBOR_USERNAME : " ${{ vars.HARBOR_USERNAME }}"
68+ HARBOR_PASSWORD : " ${{ secrets.HARBOR_PASSWORD }}"
69+ harbor_registry : ${{ vars.HARBOR_REGISTRY }}
70+
71+ # This step captures the git commit hash from the deploy action for job output
72+ - name : Set job output
73+ id : set_output
74+ run : echo "git_commit_hash=${{ steps.deploy.outputs.git_commit_hash }}" >> $GITHUB_OUTPUT
75+ shell : bash
76+ manifest :
77+ needs :
78+ - prepare
79+ - deploy
80+ runs-on : ubuntu-latest
81+ steps :
82+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
83+ - uses : ./.github/actions/manifest
84+ with :
85+ source_repository : ${{ inputs.repository }}
86+ source_ref : ${{ inputs.ref }}
87+ target_tag : ${{ needs.prepare.outputs.target_tag }}
88+ target_repository : ethpandaops/syncoor
89+ platforms : ${{ needs.prepare.outputs.platforms }}
90+ harbor_registry : ${{ vars.HARBOR_REGISTRY }}
91+ HARBOR_USERNAME : " ${{ vars.HARBOR_USERNAME }}"
92+ HARBOR_PASSWORD : " ${{ secrets.HARBOR_PASSWORD }}"
93+ git_commit_hash : ${{ needs.deploy.outputs.git_commit_hash }}
94+ DOCKER_USERNAME : " ${{ vars.DOCKER_USERNAME }}"
95+ DOCKER_PASSWORD : " ${{ secrets.DOCKER_PASSWORD }}"
96+ notify :
97+ name : Discord Notification
98+ runs-on : ubuntu-latest
99+ needs :
100+ - prepare
101+ - deploy
102+ - manifest
103+ if : failure()
104+ steps :
105+ - name : Notify
106+ uses : nobrayner/discord-webhook@1766a33bf571acdcc0678f00da4fb83aad01ebc7 # v1
107+ with :
108+ github-token : ${{ secrets.github_token }}
109+ discord-webhook : ${{ secrets.DISCORD_WEBHOOK }}
0 commit comments