good-first-issues #398
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
name: good-first-issues | |
on: | |
pull_request: [] | |
workflow_dispatch: | |
schedule: | |
- cron: 5 4 * * sun | |
jobs: | |
good-first-issues: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Repos | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python .github/scripts/add-repos.py | |
- uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
with: | |
ruby-version: '3.1' # Not needed with a .ruby-version file | |
- run: | | |
cd docs | |
bundle install | |
cd ../ | |
- name: Generate First Issues | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
rm -rf docs/_issues | |
mkdir -p docs/_issues | |
python .github/scripts/generate-first-issues.py | |
- name: Update Repository | |
if: (github.event_name != 'pull_request') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
printf "GitHub Actor: ${GITHUB_ACTOR}\n" | |
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
git branch | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
git config --global pull.rebase true | |
git add docs/_issues/* | |
if git diff-index --quiet HEAD --; then | |
printf "No changes\n" | |
else | |
printf "Changes\n" | |
today=$(date '+%Y-%m-%d') | |
git commit -a -m "Automated deployment to update ${package} versions ${today}" -m "Signed-off-by: github-actions <[email protected]>" | |
git push origin main | |
fi |