Skip to content

Commit ab6196f

Browse files
authored
Merge pull request #6 from github/zkoppert-patch-2
Add example workflow files
2 parents 7a2d62e + bdfb724 commit ab6196f

File tree

1 file changed

+67
-1
lines changed

1 file changed

+67
-1
lines changed

README.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,73 @@ Below are the allowed configuration options:
4646

4747
### Example workflows
4848

49-
TBD
49+
#### Basic
50+
51+
```yaml
52+
---
53+
name: Weekly dependabot checks
54+
on:
55+
workflow_dispatch:
56+
schedule:
57+
- cron: '3 2 1 * *'
58+
59+
permissions:
60+
issues: write
61+
62+
jobs:
63+
evergreen:
64+
name: evergreen
65+
runs-on: ubuntu-latest
66+
67+
steps:
68+
- name: Run evergreen action
69+
uses: github/evergreen@v1
70+
env:
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
ORGANIZATION: <YOUR_ORGANIZATION_GOES_HERE>
73+
```
74+
75+
#### Advanced
76+
77+
```yaml
78+
---
79+
name: Weekly dependabot checks
80+
on:
81+
workflow_dispatch:
82+
schedule:
83+
- cron: '3 2 1 * *'
84+
85+
permissions:
86+
issues: write
87+
88+
jobs:
89+
evergreen:
90+
name: evergreen
91+
runs-on: ubuntu-latest
92+
93+
steps:
94+
- shell: bash
95+
run: |
96+
# Get the current date
97+
current_date=$(date +'%Y-%m-%d')
98+
99+
# Calculate the previous month
100+
previous_date=$(date -d "$current_date -7 day" +'%Y-%m-%d')
101+
102+
echo "$previous_date..$current_date"
103+
echo "one_week_ago=$previous_date >> "$GITHUB_ENV"
104+
105+
- name: Run evergreen action
106+
uses: github/evergreen@v1
107+
env:
108+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
ORGANIZATION: <YOUR_ORGANIZATION_GOES_HERE>
110+
EXEMPT_REPOS: "org_name/repo_name_1, org_name/repo_name_2"
111+
TITLE: "Add dependabot configuration"
112+
BODY: "Please add this dependabot configuration so that we can keep the dependencies in this repo up to date and secure. for help, contact XXX"
113+
CREATED_AFTER_DATE: ${{ env.one_week_ago }}
114+
115+
```
50116
51117
## Local usage without Docker
52118

0 commit comments

Comments
 (0)