Skip to content
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

Fails when not using default branch? #30

Open
CWSites opened this issue May 14, 2021 · 3 comments
Open

Fails when not using default branch? #30

CWSites opened this issue May 14, 2021 · 3 comments

Comments

@CWSites
Copy link

CWSites commented May 14, 2021

I can't find anywhere in the documentation for this workflow which states that the default branch must be used. I updated my default to be develop and I am using this workflow on my master branch anytime there is a merge. Since making this change I am continuously getting the error The requested check was never run against this ref.

I have verified that the Dispatch job is using the same SHA as the Wait job is using.

Dispatch Config

  verification:
    name: Dispatch - Lint, Test & Build
    runs-on: ubuntu-latest

    steps:
      - name: Repository Dispatch
        uses: peter-evans/repository-dispatch@v1
        with:
          token: ${{ secrets.REPO_ACCESS_TOKEN }}
          repository: ${{ github.repository }}
          event-type: run-lint-test-build
          client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

Workflow that runs on dispatch

name: Lint, Test & Build

on:
  workflow_dispatch:
  repository_dispatch:
    types: [run-lint-test-build]

jobs:
  verification:
    name: Lint, Format & Build # used for check-name on version.yml
    runs-on: ubuntu-latest

    steps:
      - name: Checkout source code
        uses: actions/checkout@v2
        with:
          ref: ${{ github.event.client_payload.sha }}
      - run: echo using SHA ${{ github.event.client_payload.sha }}

      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 12

      # https://github.com/marketplace/actions/yarn-install-cache
      - name: Cache yarn dependencies
        uses: c-hive/gha-yarn-cache@v1

      - name: Install dependencies
        run: yarn install

      - name: Lint Code
        run: yarn lint

      - name: Code Format Check
        run: yarn format:check --verbose

      - name: Build
        run: yarn build
        env:
          CI: true

Wait Config

  checks:
    name: Wait on "Lint, Test & Build" Workflow
    runs-on: ubuntu-latest
    needs: [verification]

    steps:
      - name: wait on tests
        uses: lewagon/wait-on-check-action@master
        with:
          ref: ${{ github.sha }}
          check-name: Lint, Unit Test & Build
          repo-token: ${{ github.token }}
          wait-interval: 20

Originally posted by @CWSites in #29 (comment)

@progapandist
Copy link
Collaborator

thank you for reporting! I will try to investigate when I have some free time on my hands

@boldandbusted
Copy link

Ooh, I was about to change the Default branch on a repo that uses this Action (thank you)...

@CWSites
Copy link
Author

CWSites commented Feb 24, 2022

This is still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants