This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
Refresh jdk from Upstream #317
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Refresh jdk from Upstream" | |
on: | |
schedule: | |
- cron: '0 8 * * *' | |
workflow_dispatch: | |
env: | |
UPSTREAM_REMOTE: https://github.com/openjdk/jdk20u | |
LOCAL_BRANCH: develop | |
jobs: | |
refresh-jdk: | |
runs-on: ubuntu-latest | |
name: "Update Corretto-20" | |
if: github.repository_owner == 'corretto' | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ env.LOCAL_BRANCH }} | |
- name: "Configure the user" | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "corretto-github-robot" | |
- name: "Merge openjdk/jdk:master to the corretto-20:develop" | |
run: | | |
git fetch $UPSTREAM_REMOTE master || exit 1 | |
git merge -m "Merge upstream-jdk" FETCH_HEAD | |
- name: "Update Corretto version" | |
shell: bash | |
run: bash ./.github/scripts/update-version.sh $UPSTREAM_REMOTE | |
- name: "Push to the corretto-20" | |
run: git push origin $LOCAL_BRANCH |