-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 909 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Update Archives
on:
workflow_dispatch:
inputs:
to_software_heritage:
description: "Upload to Software Heritage"
default: "true"
required: false
schedule:
- cron: "0 5 * * *" # Everyday at 05:00 AM
push:
branches:
- "main"
paths:
- "list.txt"
jobs:
update:
permissions:
contents: write
name: Update Archives
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Overwrite options
if: github.event_name == 'workflow_dispatch' && (github.event.inputs.to_software_heritage == 'true' || github.event.inputs.to_software_heritage == 'false')
run: sed --in-place "s|^SOFTWARE_HERITAGE='.*'|SOFTWARE_HERITAGE='${{ github.event.inputs.to_software_heritage }}'|g" main.sh
- run: ./main.sh