Skip to content

Commit

Permalink
Move permissions at top level
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <dcassany@suse.com>
  • Loading branch information
davidcassany committed Jul 4, 2024
1 parent 43fd9b7 commit 93b226f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 28 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ on:
- examples/**

jobs:
permissions:
content: read
detect:
permissions:
content: read
runs-on: ubuntu-latest
outputs:
flavor: ${{ steps.set-matrix.outputs.flavor }}
Expand All @@ -43,7 +43,6 @@ jobs:
needs:
- detect
permissions:
content: read
packages: write
runs-on: ubuntu-latest
env:
Expand All @@ -66,8 +65,6 @@ jobs:
make DOCKER_ARGS=--push build
build-matrix:
permissions:
content: read
needs:
- detect
- build-toolkit
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/build_and_test_arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ concurrency:

jobs:

permissions:
content: read
build-iso:
permissions:
content: read
needs: detect
runs-on: [self-hosted, arm64]
env:
Expand Down Expand Up @@ -59,8 +59,6 @@ jobs:
enableCrossOsArchive: true

build-disk:
permissions:
content: read
needs: detect
runs-on: [self-hosted, arm64]
env:
Expand Down Expand Up @@ -105,8 +103,6 @@ jobs:
enableCrossOsArchive: true

tests-matrix:
permissions:
content: read
needs:
- build-disk
- detect
Expand Down Expand Up @@ -166,8 +162,6 @@ jobs:
make test-clean
test-installer:
permissions:
content: read
needs:
- build-iso
- detect
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/build_and_test_x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ concurrency:
cancel-in-progress: true

jobs:
permissions:
content: read
build-os:
permissions:
packages: write
content: read
runs-on: ubuntu-latest
env:
FLAVOR: ${{ inputs.flavor }}
Expand All @@ -41,8 +42,6 @@ jobs:
make ARCH=${{ env.ARCH }} DOCKER_ARGS=--push build-os
build-iso:
permissions:
content: read
needs:
- build-os
runs-on: ubuntu-latest
Expand Down Expand Up @@ -85,8 +84,6 @@ jobs:
enableCrossOsArchive: true

build-disk:
permissions:
content: read
needs:
- build-os
runs-on: ubuntu-latest
Expand Down Expand Up @@ -136,8 +133,6 @@ jobs:
enableCrossOsArchive: true

detect:
permissions:
content: read
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.detect.outputs.tests }}
Expand Down Expand Up @@ -168,8 +163,6 @@ jobs:
echo "toolkit=ghcr.io/rancher/elemental-toolkit/elemental-cli:${VERSION}" >> $GITHUB_OUTPUT
tests-matrix:
permissions:
content: read
needs:
- build-disk
- detect
Expand Down Expand Up @@ -243,8 +236,6 @@ jobs:
make test-clean
test-installer:
permissions:
content: read
needs:
- build-iso
- detect
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ on:
branches:
- main
jobs:
permissions:
content: read
build:
permissions:
content: read
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
schedule:
- cron: 0 20 * * *
jobs:
permissions:
content: read
build-deploy:
permissions:
content: read
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand Down

0 comments on commit 93b226f

Please sign in to comment.