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

[u] update updater manifest #2

Merged
merged 1 commit into from
Aug 11, 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
22 changes: 16 additions & 6 deletions .github/workflows/update_manifest_beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ jobs:
run: |
RELEASE_DATA=$(curl -s https://api.github.com/repos/CleverRaven/Cataclysm-DDA/releases | jq -r '[.[] | select(.prerelease == true)] | .[0]')

# Извлекаем тег из данных релиза
LATEST_TAG=$(echo "$RELEASE_DATA" | jq -r '.tag_name')
echo "Latest tag is $LATEST_TAG"

# Извлекаем коммит из данных релиза
LATEST_COMMIT=$(echo "$RELEASE_DATA" | jq -r '.target_commitish')
echo "Latest commit is $LATEST_COMMIT"

Expand All @@ -39,11 +37,23 @@ jobs:
git config --global user.name "github-actions"
git config --global user.email "[email protected]"

- name: Commit and push changes with tag in message
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create a new branch
run: |
NEW_BRANCH="update-manifest-$LATEST_TAG"
git checkout -b $NEW_BRANCH
git add org.cataclysmdda.CataclysmDDA.yml
git commit -m "Update manifest with latest Cataclysm-DDA commit $LATEST_COMMIT ($LATEST_TAG)"
git push origin beta
git push -u origin $NEW_BRANCH

- name: Set NEW_BRANCH Environment Variable
run: echo "NEW_BRANCH=update-manifest-$LATEST_TAG" >> $GITHUB_ENV

- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
source_branch: ${{ env.NEW_BRANCH }}
destination_branch: beta
pr_title: "Update manifest with latest Cataclysm-DDA commit $LATEST_COMMIT ($LATEST_TAG)"
pr_body: "Automatically created PR to update manifest with the latest commit."