Add a new workflow to trigger tests for a community contribution (fro… #188
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: Check Docs for Broken Links | ||
on: | ||
push: | ||
branches: [docs-0.8] | ||
pull_request: | ||
branches: [docs-0.8] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
check-broken-links-pr: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
runs-on: "ubuntu-latest" | ||
env: | ||
FORCE_COLOR: 1 | ||
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" | ||
EARTHLY_INSTALL_ID: "earthly-githubactions" | ||
DOCKERHUB_MIRROR_USERNAME: "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" | ||
DOCKERHUB_MIRROR_PASSWORD: "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" | ||
# Used in our github action as the token - TODO: look to change it into an input | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: ${{ github.head_ref }} | ||
- uses: earthly/actions-setup@main | ||
- name: Check Broken Links | ||
run: earthly --ci +check-broken-links-pr --VERBOSE=true | ||
check-broken-links-branch: | ||
if: ${{ github.event_name == 'push' }} | ||
runs-on: "ubuntu-latest" | ||
env: | ||
FORCE_COLOR: 1 | ||
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" | ||
EARTHLY_INSTALL_ID: "earthly-githubactions" | ||
DOCKERHUB_MIRROR_USERNAME: "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" | ||
DOCKERHUB_MIRROR_PASSWORD: "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" | ||
# Used in our github action as the token - TODO: look to change it into an input | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: ${{ github.head_ref }} | ||
- uses: earthly/actions-setup@main | ||
- name: Check Broken Links | ||
run: earthly --ci +check-broken-links-pr --VERBOSE=true | ||
check-broken-links-branch: | ||
if: ${{ github.event_name == 'push' }} | ||
runs-on: "ubuntu-latest" | ||
env: | ||
FORCE_COLOR: 1 | ||
EARTHLY_TOKEN: "${{ secrets.EARTHLY_TOKEN }}" | ||
EARTHLY_INSTALL_ID: "earthly-githubactions" | ||
DOCKERHUB_MIRROR_USERNAME: "${{ secrets.DOCKERHUB_MIRROR_USERNAME }}" | ||
DOCKERHUB_MIRROR_PASSWORD: "${{ secrets.DOCKERHUB_MIRROR_PASSWORD }}" | ||
# Used in our github action as the token - TODO: look to change it into an input | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: earthly/actions-setup@main | ||
- name: Check Broken Links | ||
run: earthly --ci +check-broken-links-pr --VERBOSE=true | ||