fkirc / skip-duplicate-actions

Save time and cost when using GitHub Actions
Other
475 stars 40 forks source link

Workflow fails when "do_not_skip" contains "merge_group" #332

Closed mbaumanndev closed 1 year ago

mbaumanndev commented 1 year ago

Hello,

I have a workflow with the following do_not_skip value:

do_not_skip: '["workflow_dispatch", "schedule", "merge_group"]'

When starting, I get the following error:

Error: Elements in 'do_not_skip' must be one of "pull_request", "push", "workflow_dispatch", "schedule", "release"

Here is my complete configuration for this action:

name: Code checks

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
  merge_group:
    branches: [ master ]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  queue:
    runs-on: ubuntu-latest
    if: github.event.pull_request.draft == false

    outputs:
      should_skip: ${{ steps.skip.outputs.should_skip }}
      paths_result: ${{ steps.skip.outputs.paths_result }}

    steps:
      - id: skip
        uses: fkirc/skip-duplicate-actions@v5
        with:
          concurrent_skipping: "same_content_newer"
          cancel_others: true
          skip_after_successful_duplicate: true
          do_not_skip: '["workflow_dispatch", "schedule", "merge_group"]'
          paths: '["front/**", "server/**", ".github/workflows/code-checks.yml"]'
          paths_filter: |
            front:
              paths:
                - "front/**"
            server:
              paths:
                - "server/**"
            ci:
              paths:
                - ".github/workflows/code-checks.yml"
paescuj commented 1 year ago

This is because #329 hasn't been released yet. You can use fkirc/skip-duplicate-actions@master in the meantime but I highly encourage you to switch back to a tag afterwards.

mbaumanndev commented 1 year ago

I think this shoud be told in the README, I thought it was released because it's mentionned there.

fkirc commented 1 year ago

I made a new release that includes the fix: https://github.com/fkirc/skip-duplicate-actions/releases/tag/v5.3.1