-
Notifications
You must be signed in to change notification settings - Fork 132
60 lines (54 loc) · 2.18 KB
/
advance-zed.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
name: Advance Zed
concurrency: ${{ github.workflow }}
# This type must match the event type from Zed.
# https://help.github.com/en/actions/reference/events-that-trigger-workflows#external-events-repository_dispatch
# These events only trigger on the GitHub default branch (usually main
# or master).
on:
repository_dispatch:
types: [zed-pr-merged]
workflow_dispatch:
inputs:
zed_ref:
required: true
type: string
env:
zed_ref: ${{ github.event.client_payload.merge_commit_sha || inputs.zed_ref }}
jobs:
advance-zed:
name: Advance Zed
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
with:
# ref defaults to github.sha, which is fixed at the time a run
# is triggered. Using github.ref ensures a run that waits for
# the concurrency group will see any commits pushed by the runs
# that caused it to wait, reducing push failures down below.
ref: ${{ github.ref }}
# We need a token with permission to push.
token: ${{ secrets.ZQ_UPDATE_PAT }}
- uses: ./.github/actions/setup-zui
- run: sudo apt-get -y install whois
- run: yarn workspace zui add zed@brimdata/zed#${{ env.zed_ref }}
- run: yarn lint
- run: yarn test
- run: yarn build
- name: End to end tests
id: playwright
run: |
# Mock for pcap slice opening to avoid hanging Actions Runner.
# See https://github.com/brimdata/zui/pull/2987
echo "application/vnd.tcpdump.pcap; /usr/bin/true" >> /home/runner/.mailcap
/usr/bin/xvfb-run --auto-servernum -s "-screen 0 1280x1024x24" yarn e2e:ci
- run: git -c user.name='Brim Automation' -c [email protected] commit -a -m 'upgrade Zed to ${{ env.zed_ref }}'
# If this push fails because a PR was merged while this job was
# running, you can re-run the failed job via
# https://github.com/brimdata/zui/actions. Or, if you expect
# this workflow to be dispatched again soon, you can simply ignore
# the failure.
- run: git push
if: github.event_name != 'workflow_dispatch'