Skip to content

Commit

Permalink
fix: add correct permissions to build job
Browse files Browse the repository at this point in the history
  • Loading branch information
vafanassieff committed Nov 9, 2023
1 parent 378dce5 commit 3609371
Show file tree
Hide file tree
Showing 24 changed files with 208 additions and 52 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/base-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/base-alpine
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/base-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/base-node
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/bitcoin-regtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/bitcoin-regtest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/bitcoin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/bitcoin
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/bp-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
build-release:
needs: prepare
if: ${{ (github.event_name == 'push' || github.event.inputs.target == 'release') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -66,7 +69,10 @@ jobs:
build-nightly:
needs: prepare
if: ${{ (github.event_name == 'schedule' || github.event.inputs.target == 'nightly') && (github.event.inputs.force || needs.prepare.outputs.tag-commit-exists == 'false') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -76,15 +82,21 @@ jobs:

build-lnpbp-tools-release:
needs: build-release
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
target: release

build-lnpbp-tools-nightly:
needs: build-nightly
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/bp-descriptor-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
build-release:
needs: prepare
if: ${{ (github.event_name == 'push' || github.event.inputs.target == 'release') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -66,7 +69,10 @@ jobs:
build-nightly:
needs: prepare
if: ${{ (github.event_name == 'schedule' || github.event.inputs.target == 'nightly') && (github.event.inputs.force || needs.prepare.outputs.tag-commit-exists == 'false') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -76,15 +82,21 @@ jobs:

build-lnpbp-tools-release:
needs: build-release
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
target: release

build-lnpbp-tools-nightly:
needs: build-nightly
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/bp-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
build-release:
needs: prepare
if: ${{ (github.event_name == 'push' || github.event.inputs.target == 'release') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -66,7 +69,10 @@ jobs:
build-nightly:
needs: prepare
if: ${{ (github.event_name == 'schedule' || github.event.inputs.target == 'nightly') && (github.event.inputs.force || needs.prepare.outputs.tag-commit-exists == 'false') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -76,15 +82,21 @@ jobs:

build-lnpbp-tools-release:
needs: build-release
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
target: release

build-lnpbp-tools-nightly:
needs: build-nightly
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/faraday.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/faraday
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lightning-terminal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lightning-terminal
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/lnd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
build-release:
needs: prepare
if: ${{ (github.event_name == 'push' || github.event.inputs.target == 'release') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnd
Expand All @@ -65,7 +68,10 @@ jobs:
build-nightly:
needs: prepare
if: ${{ github.event.inputs.force || ((github.event_name == 'schedule' || github.event.inputs.target == 'nightly') && needs.prepare.outputs.tag-commit-exists == 'false') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnd
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lndmon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lndmon
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/lnp-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
build-release:
needs: prepare
if: ${{ (github.event_name == 'push' || github.event.inputs.target == 'release') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -66,7 +69,10 @@ jobs:
build-nightly:
needs: prepare
if: ${{ (github.event_name == 'schedule' || github.event.inputs.target == 'nightly') && (github.event.inputs.force || needs.prepare.outputs.tag-commit-exists == 'false') }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand All @@ -76,15 +82,21 @@ jobs:

build-lnpbp-tools-release:
needs: build-release
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
target: release

build-lnpbp-tools-nightly:
needs: build-nightly
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/lnpbp-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@ on:
jobs:
build-release:
if: ${{ github.event.inputs.target == 'release' }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
target: release

build-nightly:
if: ${{ github.event.inputs.target == 'nightly' }}
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/lnpbp-tools
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/loop
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/nostr-rs-relay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/nostream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
runs-on: self-hosted
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

jobs:
build:
uses: ./.github/workflows/bake.yml
uses: ./.github/workflows/bake.yml
permissions:
contents: read
packages: write
secrets: inherit
with:
path: docker/pool
Expand Down
Loading

0 comments on commit 3609371

Please sign in to comment.