Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update year in spdx header automatically (#1753) #1763

Merged
merged 4 commits into from
Jul 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/update-spdx-header.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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:

jobs:
update:
name: Update spdx header
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- 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@v4
with:
commit-message: 'chore: update spdx header'
title: 'chore: update spdx header'
branch: chore-spdx-header
delete-branch: true
author: GitHub <noreply@github.com>