-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 2.06 KB
/
MarvelCharacterOTDFetcher.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Fetch Marvel Character Of The Day
env:
marvel_public_api_key: ${{ secrets.MARVELAPIPUBLICKEY}}
marvel_private_api_key: ${{ secrets.MARVELAPIPRIVATEKEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
jobs:
run-script:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run PowerShell script
run: .\scripts\MarvelCharacterOfTheDay.ps1 -marvelApiPublicKey "$env:marvel_public_api_key" -marvelApiPrivateKey "$env:marvel_private_api_key"
shell: pwsh
- name: Commit and push JSON file
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add MarvelCharacterOfTheDay.json
git commit -m 'Add MarvelCharacterOfTheDay.json'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push character image
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add character.jpg
git commit -m 'Add character.jpg'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push QR code image
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add comicsQR.jpg
git commit -m 'Add comicsQR.jpg'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run PowerShell script readmeupdater
run: .\scripts\ReadMeUpdater.ps1
- name: Commit and push readme
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add README.md
git commit -m 'Add README.md'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}