-
Notifications
You must be signed in to change notification settings - Fork 13
87 lines (83 loc) · 2.53 KB
/
build-push-erigon.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build erigon docker image
on:
workflow_dispatch:
inputs:
repository:
description: The source erigon repository to build from
default: ledgerwatch/erigon
type: string
required: true
ref:
description: The branch, tag or SHA to checkout and build from
default: devel
type: string
required: true
docker_tag:
description: Override target docker tag (defaults to the above source ref if left blank)
type: string
required: false
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup.outputs.matrix }}
platforms: ${{ steps.setup.outputs.platforms }}
steps:
- uses: actions/checkout@v3
- name: Prepare Matrix
id: setup
uses: ./.github/actions/prepare
with:
client: 'erigon'
deploy:
needs:
- prepare
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
with:
repository: ${{ inputs.repository }}
- uses: ./.github/actions/deploy
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_repository: ethpandaops/erigon
platform: ${{ matrix.platform }}
DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
MACOS_PASSWORD: "${{ secrets.MACOS_PASSWORD }}"
manifest:
needs:
- prepare
- deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/manifest
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}
target_repository: ethpandaops/erigon
platforms: ${{ needs.prepare.outputs.platforms }}
DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
notify:
name: Discord Notification
runs-on: ubuntu-latest
needs:
- prepare
- deploy
- manifest
if: failure()
steps:
- name: Notify
uses: nobrayner/discord-webhook@v1
with:
github-token: ${{ secrets.github_token }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}