Add auto-updating

This commit is contained in:
Nikolai V. Chr
2023-09-28 16:39:48 +02:00
parent 794afe01aa
commit a04c7d7119
2 changed files with 358 additions and 0 deletions

44
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: OPRF Asset Updater
on:
# Once Daily
schedule:
- cron: "0 0 * * *"
# When the workflow is manually run
workflow_dispatch:
inputs:
include:
description: "Files to update, separated by commas."
required: false
default: "*"
exclude:
description: "Files to skip, separated by commas."
required: false
default: ""
major:
description: "Allow major updates, not recommended until after verifying compatibility"
required: true
default: "false"
type: choice
options:
- "true"
- "false"
jobs:
update:
# Needs to be a UNIX system
runs-on: ubuntu-latest
# Needs permission to write files in order to update them
permissions:
contents: write
steps:
- name: "Manual Update"
uses: BobDotCom/OPRFAssetUpdater@v0.4
if: "${{ github.event_name == 'workflow_dispatch' }}"
with:
include: ${{ inputs.include }}
exclude: ${{ inputs.exclude }}
major: ${{ inputs.major }}
- name: "Scheduled Update"
uses: BobDotCom/OPRFAssetUpdater@v0.4
if: "${{ github.event_name != 'workflow_dispatch' }}"