Skip to content

Commit 8272f21

Browse files
committed
improve consistency of GH Actions workflows
1 parent 0c2733e commit 8272f21

File tree

4 files changed

+47
-33
lines changed

4 files changed

+47
-33
lines changed

.github/workflows/manage_issues.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Manage issues and pull requests in projects
22
on:
3-
workflow_dispatch:
43
schedule:
54
- cron: "45 * * * *" # Hourly at 45 minutes past the hour (**:45)
5+
workflow_dispatch:
6+
67
jobs:
78

89
manage_issues_and_pull_requests:
@@ -26,17 +27,14 @@ jobs:
2627
uses: actions/checkout@v4
2728

2829
- name: Install Python dependencies
29-
run: |
30-
pipenv sync --dev --system
30+
run: pipenv sync --dev --system
3131

3232
- name: 'run script to move closed issues to Active Sprint: Done'
33-
run: |
34-
./move_closed_issues.py
33+
run: ./move_closed_issues.py
3534
env:
3635
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
3736

38-
- name: run script to track open issues and pull requests
39-
run: |
40-
./track_issues_and_pull_requests.py
37+
- name: run script to track open untriaged issues and pull requests
38+
run: ./track_issues_and_pull_requests.py
4139
env:
4240
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}

.github/workflows/normalize_repos.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,46 @@
11
name: Normalize Repos
22
on:
3-
workflow_dispatch:
43
schedule:
54
- cron: '0 0 * * *' # Daily at midnight (00:00)
6-
push:
7-
branches:
8-
- main
5+
workflow_dispatch:
6+
97
jobs:
108
normalize_repos:
119
runs-on: ubuntu-latest
1210
steps:
11+
12+
# https://github.com/actions/setup-python
1313
- name: Setup Python 3.11
1414
uses: actions/setup-python@v5
1515
with:
1616
python-version: '3.11'
17+
1718
- name: Install system dependencies
1819
run: |
1920
python -m pip install --upgrade pip
2021
python -m pip install pipenv
22+
23+
# https://github.com/actions/checkout
2124
- uses: actions/checkout@v4
2225
with:
2326
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
27+
2428
- name: Install app dependencies
25-
run: |
26-
pipenv sync
29+
run: pipenv sync
30+
2731
- name: Run script with token in env
28-
run: |
29-
pipenv run ./normalize_repos.py
32+
run: pipenv run ./normalize_repos.py
3033
env:
3134
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
35+
3236
- name: Export a report of invalid issues
3337
uses: actions/upload-artifact@v4
3438
with:
3539
name: invalid-issue-report
3640
path: /tmp/invalid_issues.yml
37-
- uses: gautamkrishnar/keepalive-workflow@v1
41+
42+
# https://github.com/gautamkrishnar/keepalive-workflow
43+
- uses: gautamkrishnar/keepalive-workflow@v2
3844
with:
3945
committer_username: cc-open-source-bot
4046
committer_email: opensource@creativecommons.org

.github/workflows/push_data_to_ccos.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,33 @@ name: Push data to CC Open Source
22
on:
33
schedule:
44
- cron: '15 0 * * *' # Daily at midnight:15 (00:15)
5-
push:
6-
branches:
7-
- main
5+
workflow_dispatch:
6+
87
jobs:
98
push_data:
109
runs-on: ubuntu-latest
1110
steps:
11+
12+
# https://github.com/actions/setup-python
1213
- name: Setup Python 3.11
1314
uses: actions/setup-python@v5
1415
with:
1516
python-version: '3.11'
17+
1618
- name: Install system dependencies
1719
run: |
1820
python -m pip install --upgrade pip
1921
python -m pip install pipenv
20-
- uses: actions/checkout@v4
22+
23+
# https://github.com/actions/checkout
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
2127
- name: Install app dependencies
22-
run: |
23-
pipenv sync
28+
run: pipenv sync
29+
2430
- name: Run script with tokens in env
25-
run: |
26-
pipenv run ./push_data_to_ccos.py
31+
run: pipenv run ./push_data_to_ccos.py
2732
env:
2833
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
2934
ADMIN_ASANA_TOKEN: ${{ secrets.ADMIN_ASANA_TOKEN }}

.github/workflows/sync_community_teams.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,33 @@ name: Sync Community Teams with GitHub
22
on:
33
schedule:
44
- cron: '30 0 * * *' # Daily at midnight:30 (00:30)
5-
push:
6-
branches:
7-
- main
5+
workflow_dispatch:
6+
87
jobs:
98
sync_community_teams:
109
runs-on: ubuntu-latest
1110
steps:
11+
12+
# https://github.com/actions/setup-python
1213
- name: Setup Python 3.11
1314
uses: actions/setup-python@v5
1415
with:
1516
python-version: '3.11'
17+
1618
- name: Install system dependencies
1719
run: |
1820
python -m pip install --upgrade pip
1921
python -m pip install pipenv
20-
- uses: actions/checkout@v4
22+
23+
# https://github.com/actions/checkout
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
2127
- name: Install app dependencies
22-
run: |
23-
pipenv sync
28+
run: pipenv sync
29+
2430
- name: Run script with tokens in env
25-
run: |
26-
pipenv run ./sync_community_teams.py
31+
run: pipenv run ./sync_community_teams.py
2732
env:
2833
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
2934
ADMIN_ASANA_TOKEN: ${{ secrets.ADMIN_ASANA_TOKEN }}

0 commit comments

Comments
 (0)