Manual trigger button "Run workflow" is not showing up in GitHub Actions

39 Views Asked by At

Workflow:

name:  Accessibility Tests for  Account E2E

env:
  GLOBAL_VARIABLE: true

on:
  schedule: 
    - cron: "0 2 * * *"

workflow_dispatch: 

jobs:
  e2e-tests:
    timeout-minutes: 60
    runs-on:
      - self-hosted
      - vm:m5.large
    container:
      image: public.docker.nexus3.auiag.corp/playwright:v1.25.0-focal
            env:
        NODE_EXTRA_CA_CERTS: /certs/chain.pem


    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "21.6.2"

      - name: Install dependencies
        run: npm ci

      - name: Download browsers (for playwright v1.38 and later)
        run: npx playwright install --with-deps

      - name: Set build failure flag to true
        run: echo "GLOBAL_VARIABLE=true" >> $GITHUB_ENV

      - name: MTA NRMA Env-  DEV, Run Playwright tests for E2e
        run: |
          npm run test:dev:a11y:axe1 || echo "GLOBAL_VARIABLE=false" >> $GITHUB_ENV
        continue-on-error: true
      - name: MTA ANZ Env-  DEV, Run Playwright tests for Account E2E
        run: |
          npm run test:dev:a11y:axe2|| echo "GLOBAL_VARIABLE=false" >> $GITHUB_ENV
        continue-on-error: true
      - name: MTA DRIVA Env- Dev , Run Playwright tests for Account E2E
        run: |
          npm run test:dev:a11y:axe3 || echo "GLOBAL_VARIABLE=false" >> $GITHUB_ENV
        continue-on-error: true

      - name: Conditional step
        run: |
          if [ ${{ env.GLOBAL_VARIABLE }} = false ]; then
            echo "GLOBAL_VARIABLE is 'false'. Failing the workflow."
            exit 1
          fi
      - uses: actions/upload-artifact@v3
        if: always()
        with:
          name: test-artifacts-sample
          path: |
            html-report
            
          retention-days: 30

      - name: Publish to Github pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: |
            ./html-report
          keep_files: true

      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v2

Expected : I want to manually trigger this workflow but the "Run workflow" button is not showing up

The workflow is in proper location .github/workflows/test-accessibility.yml.

0

There are 0 best solutions below