Skip to content

Commit

Permalink
Fix workflow (#176)
Browse files Browse the repository at this point in the history
* debug

* debug

* Remove installing GitHub CLI

* GitHub Action: Update datasets (#175)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
mjaehn and github-actions[bot] authored Jul 15, 2024
1 parent 3c36bbe commit d335950
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/update_datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ jobs:
id: git-check
run: |
git diff
echo "git diff done"
if ! git diff --quiet; then
echo "Changes detected"
echo "changes_detected=true" >> "$GITHUB_ENV"
else
echo "changes_detected=false" >> "$GITHUB_ENV"
fi
echo "check done"
- name: Commit changes
if: env.changes_detected == 'true'
Expand All @@ -54,21 +57,8 @@ jobs:
branch: "update-datasets-${{ github.run_number }}"
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'
if: env.changes_detected == 'true'
run: |
PR_NUMBER=$(echo ${{ steps.create-pr.outputs.pull-request-number }})
gh pr merge $PR_NUMBER --auto --squash
Expand Down
2 changes: 1 addition & 1 deletion docs/datasets/climate_model_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
/nfs/atmos/c2sm/cmip6-ng
```

- Size: 200.62 TB :material-information-outline:{ title="last updated: 2024-07-15 11:26:45" }
- Size: 200.62 TB :material-information-outline:{ title="last updated: 2024-07-15 11:26:46" }
- Number of files: 663,800 :material-information-outline:{ title="last updated: 2024-07-15 11:26:46" }
- Access: direct / rsync
- Status: frozen (2019-03)
Expand Down

0 comments on commit d335950

Please sign in to comment.