Add git push with checkout@v4

This commit is contained in:
Dave Gallant
2023-12-09 20:06:12 -05:00
parent e60fcf2a53
commit 102f830a9d

View File

@@ -28,8 +28,8 @@ poetry run python rfd_notify/cli.py -c examples/config.yml
The following environment variables are required: The following environment variables are required:
| VARIABLE | DESCRIPTION | | VARIABLE | DESCRIPTION |
| ----------- | ---------------------------------------------------------------- | | ----------- | ---------------------------------------------------------------------------------------- |
| APPRISE_URL | See [notifications](https://github.com/caronc/apprise#productivity-based-notifications). | | APPRISE_URL | See [notifications](https://github.com/caronc/apprise#productivity-based-notifications). |
## Example Configuration ## Example Configuration
@@ -60,29 +60,21 @@ on:
- cron: "*/5 * * * *" - cron: "*/5 * * * *"
jobs: jobs:
rfd_notify: rfd_notify:
runs-on: ubuntu-latest
name: rfd-notify name: rfd-notify
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
branch: main sparse-checkout: |
fetch-depth: 0 config.yml
- name: Run rfd-notify previous_matches
uses: davegallant/rfd-notify@main - name: Commit and push changes
env:
APPRISE_URL: ${{ secrets.APPRISE_URL }}
- name: Commit files
run: | run: |
git config --local user.email "action@github.com" git config --local user.email "actions@github.com"
git config --local user.name "RFD Notify" git config --local user.name "RFD Notify"
git add previous_matches git add previous_matches
git commit -m "Update previous_matches" -a || true git commit -m "Update previous_matches" -a || true
- name: Push changes git push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
``` ```
## Gitlab Pipelines ## Gitlab Pipelines
@@ -105,5 +97,4 @@ run:
- previous_matches - previous_matches
script: script:
- python /app/rfd_notify/cli.py -c config.yml - python /app/rfd_notify/cli.py -c config.yml
``` ```