Skip to content

Merge pull request #98 from bedroge/fix_typo #74

Merge pull request #98 from bedroge/fix_typo

Merge pull request #98 from bedroge/fix_typo #74

Workflow file for this run

name: Generate Gentoo package sets
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
paths:
- scripts/generate_set_files.py
- scripts/eessi_sets.yml
pull_request:
branches: [ main ]
paths:
- scripts/generate_set_files.py
- scripts/eessi_sets.yml
# Declare default permissions as read only.
permissions: read-all
jobs:
generate_sets:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Set up Python
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # v4.3.0
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Run script that generates the package set files
run: |
pip install PyYAML
python scripts/generate_set_files.py -y scripts/eessi_sets.yml -d etc/portage/sets
- name: Commit added/modified package set files
if: ${{ github.event_name != 'pull_request' }}
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add etc/portage/sets/*
git commit -m "Add generated set files" -a || echo "No changes to commit"
- name: Create Pull Request
if: ${{ github.event_name != 'pull_request' }}
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3
with:
branch: update_set_files
delete-branch: true
title: 'Update automatically generated set files'
labels: sets