armbian-build/.github/workflows/build-cache.yml
Naveen 4577254e20
chore: Set permissions for GitHub actions (#3880)
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-11 18:04:11 +02:00

94 lines
2.2 KiB
YAML

name: Rootfs Caches
on:
workflow_dispatch:
inputs:
branch:
description: 'Build branch to use'
required: true
default: 'nightly'
permissions:
contents: read
jobs:
merge:
permissions:
contents: none
uses: armbian/scripts/.github/workflows/merge-from-branch.yml@master
with:
branch: 'nightly'
runner: small
secrets:
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
armhf:
permissions:
contents: none
needs: [ merge ]
uses: armbian/scripts/.github/workflows/build-rootfs-cache.yml@master
with:
rootfsarch: 'bananapi'
runner: 'small'
branch: ${{ github.event.inputs.branch }}
secrets:
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
aarch64:
permissions:
contents: none
needs: [ merge ]
uses: armbian/scripts/.github/workflows/build-rootfs-cache.yml@master
with:
rootfsarch: 'lepotato'
runner: 'small'
branch: ${{ github.event.inputs.branch }}
secrets:
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
amd64:
permissions:
contents: none
needs: [ merge ]
uses: armbian/scripts/.github/workflows/build-rootfs-cache.yml@master
with:
rootfsarch: 'uefi-x86'
runner: 'x64'
branch: ${{ github.event.inputs.branch }}
secrets:
GPG_KEY1: ${{ secrets.GPG_KEY1 }}
GPG_PASSPHRASE1: ${{ secrets.GPG_PASSPHRASE1 }}
GPG_KEY2: ${{ secrets.GPG_KEY2 }}
GPG_PASSPHRASE2: ${{ secrets.GPG_PASSPHRASE2 }}
SCRIPTS_ACCESS_TOKEN: ${{ secrets.SCRIPTS_ACCESS_TOKEN }}
jobsend:
permissions:
contents: none
name: finish
needs: [armhf,aarch64,amd64]
runs-on: [ubuntu-latest]
if: ${{ github.repository_owner == 'Armbian' }}
steps:
- run: |
echo "End"