Skip to content

fix workflow call

fix workflow call #9

Workflow file for this run

{
name: simver,
concurrency: { group: simver, cancel-in-progress: false },
permissions: { id-token: write, contents: write, pull-requests: read },
on:
{
workflow_dispatch: null,
workflow_call: { secrets: { GITHUB_TOKEN: { required: true } } },

Check failure on line 8 in .github/workflows/simver.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/simver.yaml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
push: { branches: [main] },
pull_request: { types: [opened, synchronize, reopened, closed] },
},
defaults: { run: { shell: bash } },
jobs:
{
simver:
{
runs-on: ubuntu-latest,
steps:
[
{
name: checkout code,
uses: "actions/checkout@v4",
with: { fetch-depth: 0 },
},
{
name: setup golang,
uses: "actions/setup-go@v4",
with: { go-version: 1.21.4 },
},
{
name: install simver,
run: "go install github.com/walteh/simver/cmd/simver_github_actions@v0.4.1",
},
{
name: run simver,
id: simver,
env:
{
SIMVER_READ_ONLY: false,
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}",
},
run: simver_github_actions,
},
],
},
},
}