diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 129bc4d..672e22b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,7 +38,7 @@ jobs: FILE_NAME: ".github/workflows/cmd-action.yml" - name: Validate that cmd-run points to main branch run: | - BRANCH=$(yq '.jobs.cmd-run.steps[0].uses' $FILE_NAME | cut -d "@" -f2) + BRANCH=$(yq '.jobs.cmd-run.steps[1].uses' $FILE_NAME | cut -d "@" -f2) # If the branch is not the main branch if [ "$BRANCH" != "$GITHUB_BASE_REF" ]; then echo "Action points to $BRANCH. It has to point to $GITHUB_BASE_REF instead!"