Skip to content

Merge Latest Tag from Tip #10

Merge Latest Tag from Tip

Merge Latest Tag from Tip #10

name: "Merge Latest Tag from Tip"
on:
schedule:
- cron: '0 8 * * 4'
workflow_dispatch:
jobs:
merge-from-tip:
# We only want this to run in one repo
# if: github.repository == 'openjdk/shenandoah'
runs-on: ubuntu-latest
name: Merge latest tag
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOWS }}
repository: openjdk/shenandoah
- name: Fetch latest tag
id: latest-tag
run: |
git remote add upstream https://github.com/openjdk/jdk.git
git fetch upstream
echo "latest=$(git tag --list 'jdk-22*' --sort=-creatordate | head -1)" >> "$GITHUB_OUTPUT"
- name: Reset the default branch with latest tag
run: |
git reset --hard ${{ steps.latest-tag.outputs.latest }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Merge tag ${{ steps.latest-tag.outputs.latest }}
token: ${{ secrets.WORKFLOWS }}
branch: merge-${{ steps.latest-tag.outputs.latest }}
delete-branch: true
title: Merge openjdk/jdk:master
body: Merges tag ${{ steps.latest-tag.outputs.latest }}