Skip to content

Commit

Permalink
fix commits, branches, identation. Add content and ids
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinsNadia committed Dec 9, 2024
1 parent 062b624 commit e517a4e
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions licenses/check_licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@ name: Check and update licenses

on:
push:
branches:
- main
branches: [ "*-software.eessi.io" ]
pull_request:
branches:
- main
branches: [ "*-software.eessi.io" ]
permissions:
contents: write # set permissions for writing

jobs:
license_update:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c
with:
python-version: '3.X'
python-version: '3.9'

- name: Run license script and generate patch
id: check_licenses
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -33,17 +34,18 @@ jobs:
fi
- name: Create a PR (if changes detected)
uses: peter-evans/create-pull-request@v5
id: create_pull_request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
if: steps.check_licenses.outputs.patch != ''
with:
commit-message: "Auto PR: Update licenses"
title: "Auto PR: Update licenses"
body: ${{ steps.check_licenses.outputs.patch }}
branch: main #fork branch
base: main #specify right brancg here
commit-message: "Auto PR: Update licenses"
title: "Auto PR: Update licenses"
body: ${{ steps.check_licenses.outputs.patch }}
branch: update-licenses-${{ github.run_number }}
base: [ "*-software.eessi.io" ]

- name: Apply patch (if no PR created)
if: steps.create_pull_request.outputs.pull-request-number == '' && steps.check_licenses.outputs.patch != ''
if: steps.create_pull_request.outputs.number == '' && steps.check_licenses.outputs.patch != ''
run: |
if [ -f license_update.patch ] && [ -s license_update.patch ]; then
git apply license_update.patch
Expand Down

0 comments on commit e517a4e

Please sign in to comment.