Skip to content

Commit

Permalink
Update workflow to sync from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
chadrako committed Jan 8, 2024
1 parent 73cdc1c commit f13e2aa
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 115 deletions.
19 changes: 0 additions & 19 deletions .github/actions/fetch-repo/action.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/actions/fetch-repo/refresh.sh

This file was deleted.

19 changes: 0 additions & 19 deletions .github/actions/merge-repo/action.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/actions/merge-repo/merge.sh

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/refresh-jdk-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Refresh jdk from Upstream-dev"
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
env:
UPSTREAM_REMOTE: https://github.com/openjdk/jdk21u-dev
LOCAL_BRANCH: nightly
jobs:
refresh-jdk:
runs-on: ubuntu-latest
name: "Update Corretto-21"
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/jdk21u-dev:master to the corretto-21:nightly"
run: |
git fetch $UPSTREAM_REMOTE master || exit 1
git merge -m "Merge upstream-jdk21u-dev" FETCH_HEAD
- name: "Update Corretto version"
shell: bash
run: bash ./.github/scripts/update-version.sh $UPSTREAM_REMOTE
- name: "Push to the corretto-21"
run: git push origin $LOCAL_BRANCH
45 changes: 23 additions & 22 deletions .github/workflows/refresh-jdk.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: "Refresh jdk21 from Upstream"
name: "Refresh jdk from Upstream"
on:
schedule:
- cron: '0 7 * * *'
- cron: '0 8 * * *'
workflow_dispatch:

env:
UPSTREAM_REMOTE: https://github.com/openjdk/jdk21u
LOCAL_BRANCH: develop
jobs:
refresh-jdk21:
refresh-jdk:
runs-on: ubuntu-latest
name: "Update Corretto-21"
if: github.repository_owner == 'corretto'
Expand All @@ -14,23 +16,22 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Fetch Corretto-21 upstream"
uses: ./.github/actions/fetch-repo
with:
upstream: 'https://github.com/openjdk/jdk21u.git'
local-branch: 'upstream'
- name: "Merge Corretto-21"
uses: ./.github/actions/merge-repo
with:
upstream: 'upstream'
merge-branch: 'develop'
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-21:develop"
run: |
git fetch $UPSTREAM_REMOTE master || exit 1
git merge -m "Merge upstream-jdk" FETCH_HEAD
- name: "Update Corretto version"
uses: ./.github/actions/update-version
with:
upstream: 'upstream'
version-branch: 'develop'
shell: bash
run: bash ./.github/scripts/update-version.sh $UPSTREAM_REMOTE
- name: "Push to the corretto-21"
run: git push origin $LOCAL_BRANCH
- name: "Merge Corretto-21 develop to nightly"
uses: ./.github/actions/merge-repo
with:
upstream: 'develop'
merge-branch: 'nightly'
shell: bash
run: |
git checkout nightly
git merge origin/$LOCAL_BRANCH
31 changes: 0 additions & 31 deletions .github/workflows/refresh-jdk21-dev.yml

This file was deleted.

0 comments on commit f13e2aa

Please sign in to comment.