Skip to content

zed-pr-merged

zed-pr-merged #1530

Workflow file for this run

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: 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
uses: GabrielBB/xvfb-action@v1
with:
options: -screen 0 1280x1024x24
run: yarn e2e
- uses: actions/upload-artifact@v2
if: failure() && steps.playwright.outcome == 'failure'
with:
name: artifacts-${{ matrix.os }}
path: |
run/playwright-itest
!run/**/SS
- 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'