Skip to content

Daily Open and Closed Issues Check #25

Daily Open and Closed Issues Check

Daily Open and Closed Issues Check #25

name: Update Github Issues
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to update'
required: true
default: 'main'
schedule:
- cron: '0 0 * * *'
jobs:
Update-Github-Issues:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Show Inputs
run: |
echo "Selected branch: ${{ github.event.inputs.branch }}"
- uses: actions/checkout@v4
with:
submodules: "recursive"
ref: ${{ github.event.inputs.branch }} # Checkout the specified branch
- name: Validate branch exists
run: |
git fetch --all
if ! git rev-parse --verify "origin/${{ github.event.inputs.branch }}" > /dev/null 2>&1; then
echo "Branch '${{ github.event.inputs.branch }}' does not exist."
exit 1
fi
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run
run: yarn update-github-issues
- name: Git commit and push
env:
CI_COMMIT_AUTHOR: Vortex Backend
CI_COMMIT_EMAIL: [email protected]
CI_COMMIT_MESSAGE: Update Github Issues
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
git pull origin ${{ github.event.inputs.branch }} # Pull the latest changes from the branch
git add . # Add changes before committing
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push origin ${{ github.event.inputs.branch }} # Push changes to the specified branch