Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically merge Datasets workflow #166

Merged
merged 3 commits into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/update_datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,25 @@ jobs:
title: "[AUTO] Update Datasets"
body: "This is an auto-generated PR with dataset updates."
branch: "update-datasets-${{ github.run_number }}"
delete-branch: true
delete-branch: true

- name: Install GitHub CLI
run: |
if ! command -v gh &> /dev/null
then
echo "GitHub CLI not found, installing..."
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh -y
else
echo "GitHub CLI is already installed."
fi

- name: Enable Auto-Merge for the PR
if: steps.git-check.outputs.changes_detected == 'true'
run: |
PR_NUMBER=$(echo ${{ steps.create-pr.outputs.pull-request-number }})
gh pr merge $PR_NUMBER --auto --merge
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Loading