Update spdx header #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a scheduled workflow to keep the spdx header up to date | |
name: Update spdx header | |
on: | |
schedule: | |
# Runs at 00:00 UTC on the 2nd January of every year | |
- cron: '0 0 2 1 *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
update: | |
permissions: | |
contents: write # for peter-evans/create-pull-request to create branch | |
pull-requests: write # for peter-evans/create-pull-request to create a PR | |
name: Update spdx header | |
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Update spdx header | |
run: | | |
sed -i "s/[0-9]\{4\}/$(date +%Y)/" spdx_header.txt | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | |
with: | |
commit-message: 'chore: update spdx header' | |
title: 'chore: update spdx header' | |
branch: chore-spdx-header | |
delete-branch: true | |
author: GitHub <[email protected]> |