zed-pr-merged #1734
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: 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@v4 | |
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' |