Skip to content

Commit 88abfc2

Browse files
authored
Merge pull request #7 from saadmk11/naming-update
Fix inconsistent naming
2 parents 4431b56 + 7625908 commit 88abfc2

5 files changed

Lines changed: 36 additions & 36 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Version: v0.5.0
22

3-
* [#1](https://github.com/saadmk11/github-action-upgrade/pull/1): Create LICENSE
4-
* [#2](https://github.com/saadmk11/github-action-upgrade/pull/2): Add ignore option to ignore particular action updates
5-
* [#3](https://github.com/saadmk11/github-action-upgrade/pull/3): Add documentation
6-
* [#4](https://github.com/saadmk11/github-action-upgrade/pull/4): Add Changelog CI
3+
* [#1](https://github.com/saadmk11/github-actions-version-updater/pull/1): Create LICENSE
4+
* [#2](https://github.com/saadmk11/github-actions-version-updater/pull/2): Add ignore option to ignore particular action updates
5+
* [#3](https://github.com/saadmk11/github-actions-version-updater/pull/3): Add documentation
6+
* [#4](https://github.com/saadmk11/github-actions-version-updater/pull/4): Add Changelog CI

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
FROM python:3.8
22

3-
LABEL "com.github.actions.name"="GitHub Action Updater"
4-
LABEL "com.github.actions.description"="GitHub Action Updater updates GitHub action version and creates a pull request with the changes."
3+
LABEL "com.github.actions.name"="GitHub Actions Version Updater"
4+
LABEL "com.github.actions.description"="GitHub Actions Version Updater updates GitHub Action versions in a repository and creates a pull request with the changes."
55
LABEL "com.github.actions.icon"="upload-cloud"
66
LABEL "com.github.actions.color"="green"
77

8-
LABEL "repository"="https://github.com/saadmk11/github-action-upgrade"
9-
LABEL "homepage"="https://github.com/saadmk11/github-action-upgrade"
8+
LABEL "repository"="https://github.com/saadmk11/github-actions-version-updater"
9+
LABEL "homepage"="https://github.com/saadmk11/github-actions-version-updater"
1010
LABEL "maintainer"="saadmk11"
1111

1212
COPY requirements.txt /requirements.txt

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
## GitHub Action Version Updater
1+
## GitHub Actions Version Updater
22

3-
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/saadmk11/github-action-upgrade?style=flat-square)](https://github.com/saadmk11/github-action-upgrade/releases/latest)
4-
[![GitHub](https://img.shields.io/github/license/saadmk11/github-action-upgrade?style=flat-square)](https://github.com/saadmk11/github-action-upgrade/blob/main/LICENSE)
3+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/saadmk11/github-actions-version-updater?style=flat-square)](https://github.com/saadmk11/github-actions-version-updater/releases/latest)
4+
[![GitHub](https://img.shields.io/github/license/saadmk11/github-actions-version-updater?style=flat-square)](https://github.com/saadmk11/github-actions-version-updater/blob/main/LICENSE)
55
[![GitHub Marketplace](https://img.shields.io/badge/Get%20It-on%20Marketplace-orange?style=flat-square)](https://github.com/marketplace/actions/github-action-updater)
6-
[![GitHub stars](https://img.shields.io/github/stars/saadmk11/github-action-upgrade?color=success&style=flat-square)](https://github.com/saadmk11/github-action-upgrade/stargazers)
7-
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/saadmk11/github-action-upgrade/Changelog%20CI?label=Changelog%20CI&style=flat-square)
6+
[![GitHub stars](https://img.shields.io/github/stars/saadmk11/github-actions-version-updater?color=success&style=flat-square)](https://github.com/saadmk11/github-actions-version-updater/stargazers)
7+
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/saadmk11/github-actions-version-updater/Changelog%20CI?label=Changelog%20CI&style=flat-square)
88

9-
**GitHub Action Version Updater** is GitHub Action that is used to **update other GitHub Actions** in a Repository
9+
**GitHub Actions Version Updater** is GitHub Action that is used to **update other GitHub Actions** in a Repository
1010
and create a **pull request** with the updates. It is an automated dependency updater similar to GitHub's **Dependabot**,
1111
but for GitHub Actions.
1212

1313
### How Does It Work:
1414

15-
* GitHub Action Version Updater first goes through all the **workflows**
15+
* GitHub Actions Version Updater first goes through all the **workflows**
1616
in a repository and **checks for updates** for each of the action used in those workflows.
1717

1818
* If an update is found and if that action is **not ignored** then the workflows are updated
@@ -27,11 +27,11 @@ but for GitHub Actions.
2727
We recommend running this action on a [`schedule`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule)
2828
event or a [`workflow_dispatch`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) event.
2929

30-
To integrate `GitHub Action Version Updater` on your repository, create a `YAML` file
30+
To integrate `GitHub Actions Version Updater` on your repository, create a `YAML` file
3131
inside `.github/workflows/` directory (`.github/workflows/updater.yaml`) add the following into the file:
3232

3333
```yaml
34-
name: GitHub Action Version Updater
34+
name: GitHub Actions Version Updater
3535

3636
# Controls when the action will run.
3737
on:
@@ -51,16 +51,16 @@ jobs:
5151
# Access token with `workflow` scope is required
5252
token: ${{ secrets.WORKFLOW_SECRET }}
5353

54-
- name: Run GitHub Action Updater
55-
uses: saadmk11/github-action-upgrade@v0.5.0
54+
- name: Run GitHub Actions Version Updater
55+
uses: saadmk11/github-actions-version-updater@v0.5.0
5656
with:
5757
# Optional, This will be used to configure git
5858
# defaults to `github-actions[bot]` if not provided
5959
committer_username: 'test'
6060
committer_email: 'test@test.com'
6161
# Access token with `workflow` scope is required
6262
token: ${{ secrets.WORKFLOW_SECRET }}
63-
# Do not upgrade these actions (Optional)
63+
# Do not update these actions (Optional)
6464
# You need to add JSON array inside a string
6565
# because GitHub Actions does not yet allow `Lists` as input
6666
ignore: '["actions/checkout@v2", "actions/cache@v2"]'
@@ -75,9 +75,9 @@ with **repo** and **workflow** scope and pass it to the action.
7575

7676
To know more about how to pass a secret to GitHub actions you can [Read GitHub Docs](https://docs.github.com/en/actions/reference/encrypted-secrets)
7777

78-
### Demo:
78+
### GitHub Actions Version Updater in Action:
7979

80-
![GitHub Action Updater](https://github.com/__user-images/24854406/113888349-15dbdc00-97e4-11eb-91a6-622828455d1f.gif)
80+
![GitHub Actions Version Updater Demo](https://github.com/__user-images/24854406/113888349-15dbdc00-97e4-11eb-91a6-622828455d1f.gif)
8181

8282

8383
### License

action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: GitHub Action Updater
2-
description: GitHub Action Updater upgrades GitHub Action versions and creates a pull request with the changes.
1+
name: GitHub Actions Version Updater
2+
description: GitHub Actions Version Updater updates GitHub Action versions in a repository and creates a pull request with the changes.
33
author: Maksudul Haque
44
branding:
55
icon: 'upload-cloud'
@@ -14,7 +14,7 @@ inputs:
1414
required: false
1515
default: 'github-actions[bot]@users.noreply.github.com'
1616
ignore:
17-
description: 'A JSON array which denotes the actions that should not be upgraded'
17+
description: 'A JSON array which denotes the actions that should not be updated'
1818
required: false
1919
default: '[]'
2020
token:

main.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import yaml
88

99

10-
class GitHubActionUpgrade:
10+
class GitHubActionsVersionUpdater:
1111
"""Main class that checks for updates and creates pull request"""
1212

1313
github_api_url = 'https://github.com/__api'
@@ -54,7 +54,7 @@ def run(self):
5454

5555
if not workflow_paths:
5656
print_message(
57-
f'No Work flow found in "{self.repository}". Skipping GitHub Actions upgrade',
57+
f'No Workflow found in "{self.repository}". Skipping GitHub Actions Version Update',
5858
message_type='warning'
5959
)
6060
return
@@ -124,7 +124,7 @@ def run(self):
124124

125125
if self.workflow_updated:
126126
# Use timestamp to ensure uniqueness of the new branch
127-
new_branch = f'gh-action-upgrade-{int(time.time())}'
127+
new_branch = f'gh-actions-update-{int(time.time())}'
128128

129129
print_message('Create New Branch', message_type='group')
130130

@@ -136,7 +136,7 @@ def run(self):
136136
)
137137
subprocess.run(['git', 'add', '.'])
138138
subprocess.run(
139-
['git', 'commit', '-m', 'Upgrade GitHub Action Versions']
139+
['git', 'commit', '-m', 'Update GitHub Action Versions']
140140
)
141141

142142
subprocess.run(['git', 'push', '-u', 'origin', new_branch])
@@ -158,10 +158,10 @@ def create_pull_request(self, branch_name, body):
158158
"""Create pull request on GitHub"""
159159
url = f'{self.github_api_url}/repos/{self.repository}/pulls'
160160
payload = {
161-
'title': 'Upgrade GitHub Action Versions',
161+
'title': 'Update GitHub Action Versions',
162162
'head': branch_name,
163163
'base': self.base_branch,
164-
'body': '### GitHub Actions Version Upgrades\n' + body,
164+
'body': '### GitHub Actions Version Updates\n' + body,
165165
}
166166

167167
response = requests.post(
@@ -297,13 +297,13 @@ def print_message(message, message_type=None):
297297

298298
print_message('', message_type='endgroup')
299299

300-
# Group: Run Upgrade GitHub Actions
301-
print_message('Upgrade GitHub Actions', message_type='group')
300+
# Group: Run Update GitHub Actions
301+
print_message('Update GitHub Actions', message_type='group')
302302

303-
# Initialize GitHubActionUpgrade
304-
action_upgrade = GitHubActionUpgrade(
303+
# Initialize GitHubActionsVersionUpdater
304+
actions_version_updater = GitHubActionsVersionUpdater(
305305
repository, base_branch, token, ignore_actions=ignore
306306
)
307-
action_upgrade.run()
307+
actions_version_updater.run()
308308

309309
print_message('', message_type='endgroup')

0 commit comments

Comments
 (0)