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

fix: token permission in Installer scheduled tests #407

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/schedule.installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
permissions: read-all

env:
GH_TOKEN: ${{ secrets.CREATE_ISSUES }}
GH_TOKEN: ${{ github.token }}
ISSUE_REPOSITORY: ${{ github.repository }}
MINIMUM_INSTALLER_VERSION: v2.0.1

Expand Down Expand Up @@ -188,10 +188,13 @@ jobs:
[ "$SUCCESS" == "true" ]

if-succeed:
needs: [verifier-run]
needs: [verifier-run, list-verifiers]
runs-on: ubuntu-latest
# We use `== 'failure'` instead of ` != 'success'` because we want to ignore skipped jobs, if there are any.
if: always() && inputs.version == '' && needs.verifier-run.result != 'failure'
if: inputs.version == '' && needs.verifier-run.result != 'failure' && needs.list-verifiers.result != 'failure'
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # tag=v2.4.0
with:
Expand All @@ -200,10 +203,12 @@ jobs:
- run: ./.github/workflows/scripts/e2e-report-success.sh

if-failed:

needs: [verifier-run]
needs: [verifier-run, list-verifiers]
runs-on: ubuntu-latest
if: always() && inputs.version == '' && needs.verifier-run.result == 'failure'
if: always() && inputs.version == '' && (needs.verifier-run.result == 'failure' || needs.list-verifiers.result == 'failure')
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # tag=v2.4.0
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ minimum_version="$MINIMUM_INSTALLER_VERSION"
list=""
# Check the releases.
echo "Listing releases"
# Note: can remove -R option.
release_list=$(gh -R slsa-framework/slsa-verifier release list)
release_list=$(gh release list)
while read -r line; do
tag=$(echo "$line" | cut -f1)
if version_ge "$tag" "$minimum_version"; then
Expand Down