fwupd/.github/workflows/create_containers.yml
naveen ea395eff83 chore: Set permissions for GitHub actions
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-06 08:47:52 +01:00

33 lines
789 B
YAML

name: Create containers
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
push_to_registry:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [fedora, debian-x86_64, arch, debian-i386, void]
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: "Generate Dockerfile"
env:
OS: ${{ matrix.os }}
run: ./contrib/ci/generate_docker.py
- name: Push to GitHub Packages
uses: docker/build-push-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: fwupd/fwupd/fwupd-${{matrix.os}}
tags: latest