Skip to content

Commit

Permalink
configure workflow default permission
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Jul 1, 2024
1 parent 89b0de1 commit 2e583ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 32 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/build-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
description: MariaDB versions to build (JSON Array)
required: false
default: ""
permissions:
contents: write
id-token: write
attestations: write

jobs:
list:
Expand Down Expand Up @@ -48,10 +52,6 @@ jobs:
MARIADB_VERSION: ${{ matrix.mariadb }}
BUILD_OS: ${{ matrix.os }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: .github/build-mariadb-linux.sh "$MARIADB_VERSION"
Expand All @@ -76,10 +76,6 @@ jobs:
env:
MARIADB_VERSION: ${{ matrix.mariadb }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: .github/build-mariadb-darwin.sh ${{ matrix.mariadb }}
Expand All @@ -105,10 +101,6 @@ jobs:
env:
MARIADB_VERSION: ${{ matrix.mariadb }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: .github/build-mariadb-darwin.sh ${{ matrix.mariadb }}
Expand All @@ -134,10 +126,6 @@ jobs:
env:
MARIADB_VERSION: ${{ matrix.mariadb }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: .github\build-mariadb-windows.ps1 $env:MARIADB_VERSION
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/build-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
required: false
default: ""

permissions:
contents: write
id-token: write
attestations: write

jobs:
list:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -48,10 +53,6 @@ jobs:
MYSQL_VERSION: ${{ matrix.mysql }}
BUILD_OS: ${{ matrix.os }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: .github/build-mysql-linux.sh "$MYSQL_VERSION"
Expand All @@ -76,10 +77,6 @@ jobs:
env:
MYSQL_VERSION: ${{ matrix.mysql }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: |
Expand Down Expand Up @@ -108,10 +105,6 @@ jobs:
env:
MYSQL_VERSION: ${{ matrix.mysql }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: |
Expand Down Expand Up @@ -140,10 +133,6 @@ jobs:
env:
MYSQL_VERSION: ${{ matrix.mysql }}
timeout-minutes: 180
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- run: .github\build-mysql-windows.ps1 $env:MYSQL_VERSION

Check warning on line 138 in .github/workflows/build-mysql.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC1001:info:1:8: This \b will be a regular 'b' in this context [shellcheck] Raw Output: .github/workflows/build-mysql.yml:138:9: shellcheck reported issue in this script: SC1001:info:1:8: This \b will be a regular 'b' in this context [shellcheck]

Check warning on line 138 in .github/workflows/build-mysql.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:33: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/build-mysql.yml:138:9: shellcheck reported issue in this script: SC2086:info:1:33: Double quote to prevent globbing and word splitting [shellcheck]
Expand Down

0 comments on commit 2e583ec

Please sign in to comment.