-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/parchlinux/GetContributors
- Loading branch information
Showing
4 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 0 */3 * *" # Runs at midnight (0:00) every 3rd day | ||
|
||
jobs: | ||
run_ruby_script: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3.0' | ||
- name: Install Bundler | ||
run: | | ||
gem list bundle | ||
- name: Bundle install dependencies | ||
run: bundle install | ||
- name: Set environment variable (securely) | ||
run: | | ||
echo "::group::" | ||
echo "Setting GITHUB_PERSONAL_ACCESS_TOKEN..." | ||
echo "GITHUB_PERSONAL_ACCESS_TOKEN=${{ secrets.GITHUBPA }}" >> $GITHUB_ENV # Store token securely | ||
echo "::endgroup::" | ||
- name: Update contributors list | ||
run: | | ||
chmod +x main.rb | ||
ruby main.rb | ||
- name: Commit changes | ||
run: | | ||
git config --local user.name "tahadostifam" | ||
git config --local user.email "mr.tahadostifam@gmail.com" | ||
git add ./json/contributors.json | ||
git commit -m "Contributors list located at json/contributors.json updated by github-worfklow" | ||
- name: Push changes # push the output folder to your repo | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUBPA }} | ||
force: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
json/contributors.json | ||
.idea | ||
.vscode |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
gem "octokit", "~> 8.1" | ||
source 'http://rubygems.org' | ||
|
||
gem "octokit", "~> 8.1" |
Oops, something went wrong.