-
-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (33 loc) · 1.39 KB
/
recreate.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
35
name: Recreate action
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *'
jobs:
build:
name: Recreate action
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Armbian' }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Create local changes
run: |
wget https://www.armbian.com/userdata.csv
cat userdata.csv | cut -d"/" -f1 | uniq | sed 's/.*/ - board: &/' > .github/workflows/boards.txt
sed '/include/r.github/workflows/boards.txt' .github/workflows/mirror-purge.template > .github/workflows/mirror-purge.yml
sed '/include/r.github/workflows/boards.txt' .github/workflows/mirror-sync.template > .github/workflows/mirror-sync.yml
git add .github/workflows/mirror-purge.yml
git add .github/workflows/mirror-sync.yml
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "Armbianworker"
git commit --allow-empty -m "Update github actions" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MIRROR }}
branch: ${{ github.ref }}