Skip to content

Configure required GHA jobs for merge_group #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/amplify-preview.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Docs Preview
on:
pull_request:
merge_group:

permissions:
pull-requests: write
id-token: write

jobs:
amplify-preview:
if: ${{ github.event_name != 'merge_group' }}
name: Amplify Preview
runs-on: ubuntu-22.04-2core-arm64
environment: docs-amplify
Expand All @@ -25,3 +27,32 @@ jobs:
create_branches: "false"
github_token: ${{ secrets.GITHUB_TOKEN }}
wait: "true"

# If the event is merge_group, we want to make sure the build passes with the
# most recent version of the docs content to prevent unexpected inputs from
# breaking the build. Execute a local build on the GitHub Actions runner
# without a preview link.
local-preview:
if: ${{ github.event_name == 'merge_group'}}
name: Amplify Preview
runs-on: ubuntu-22.04-2core-arm64
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 23
cache: 'yarn'
- name: Install deps
run: yarn
- name: Prepare docs site configuration
# Replace data fetched from Sanity CMS with hardcoded JSON objects to
# remove the need to authenticate with Sanity. Each includes the minimal
# set of data required for docs builds to succeed.
run: |
NEW_PACKAGE_JSON=$(jq '.scripts."prepare-sanity-data" = "echo Using pre-populated Sanity data"' package.json);
echo "$NEW_PACKAGE_JSON" > package.json;
echo "{}" > data/events.json
echo '{"bannerButtons":{"second":{"title":"LOG IN","url":"https://teleport.sh"},"first":{"title":"Support","url":"https://goteleport.com/support/"}},"navbarData":{"rightSide":{},"logo":"/favicon.svg","menu":[]}}' > data/navbar.json
- name: Build the docs with the latest content
run: yarn build
33 changes: 0 additions & 33 deletions .github/workflows/check-build.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ on:
branches:
- main
- dev
merge_group:

jobs:
analyze:
name: Analyze
if: ${{ github.event_name != 'merge_group' }}
name: CodeQL
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Dependency Review

on:
pull_request:
merge_group:

jobs:
dependency-review:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Test
on:
pull_request:
merge_group:

jobs:
run-tests:
name: Run tests
if: ${{ github.event_name != 'merge_group' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably run this on merge queue as well, it won't hurt I guess.

runs-on: ubuntu-22.04-2core-arm64
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down