Fetch Marvel Character Of The Day #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |