forked from spinnaker/orca
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bumpdeps): enable autobumps (spinnaker#3586)
* chore(bumpdeps): enable autobumps * chore(GHA): fix the indentation * chore(GHA): sleep for 5 minutes before running bumpdeps
- Loading branch information
Showing
2 changed files
with
73 additions
and
48 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Bump Dependencies | ||
|
||
on: | ||
repository_dispatch: | ||
types: [bump-dependencies] | ||
|
||
jobs: | ||
bump-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: spinnaker/bumpdeps@master | ||
with: | ||
ref: ${{ github.event.client_payload.ref }} | ||
key: orcaVersion | ||
repositories: kayenta | ||
env: | ||
GITHUB_OAUTH: ${{ secrets.SPINNAKER_GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,51 +10,59 @@ jobs: | |
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- uses: actions/[email protected] | ||
with: | ||
path: ~/.gradle | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Assemble release info | ||
id: release_info | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
. .github/workflows/release_info.sh ${{ github.event.repository.name }} | ||
echo ::set-output name=CHANGELOG::$(echo -e "${CHANGELOG}") | ||
echo ::set-output name=SKIP_RELEASE::${SKIP_RELEASE} | ||
echo ::set-output name=IS_CANDIDATE::${IS_CANDIDATE} | ||
- name: Candidate build | ||
if: steps.release_info.outputs.IS_CANDIDATE == 'true' | ||
env: | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
GRADLE_OPTS: -Xmx6g -Xms6g -Dorg.gradle.daemon=false | ||
run: | | ||
./gradlew -PenablePublishing=true --info -Prelease.disableGitChecks=true -Prelease.useLastTag=true -PbintrayUser="${BINTRAY_USER}" -PbintrayKey="${BINTRAY_API_KEY}" -x test candidate | ||
- name: Release build | ||
if: steps.release_info.outputs.IS_CANDIDATE == 'false' | ||
env: | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
GRADLE_OPTS: -Xmx6g -Xms6g -Dorg.gradle.daemon=false | ||
run: | | ||
./gradlew -PenablePublishing=true --info -Prelease.disableGitChecks=true -Prelease.useLastTag=true -PbintrayUser="${BINTRAY_USER}" -PbintrayKey="${BINTRAY_API_KEY}" -x test final | ||
- name: Create release | ||
if: steps.release_info.outputs.SKIP_RELEASE == 'false' | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.event.repository.name }} ${{ github.ref }} | ||
body: | | ||
${{ steps.release_info.outputs.CHANGELOG }} | ||
draft: false | ||
prerelease: ${{ steps.release_info.outputs.IS_CANDIDATE }} | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Assemble release info | ||
id: release_info | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
. .github/workflows/release_info.sh ${{ github.event.repository.name }} | ||
echo ::set-output name=CHANGELOG::$(echo -e "${CHANGELOG}") | ||
echo ::set-output name=SKIP_RELEASE::${SKIP_RELEASE} | ||
echo ::set-output name=IS_CANDIDATE::${IS_CANDIDATE} | ||
- name: Candidate build | ||
if: steps.release_info.outputs.IS_CANDIDATE == 'true' | ||
env: | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
GRADLE_OPTS: -Xmx6g -Xms6g -Dorg.gradle.daemon=false | ||
run: | | ||
./gradlew -PenablePublishing=true --info -Prelease.disableGitChecks=true -Prelease.useLastTag=true -PbintrayUser="${BINTRAY_USER}" -PbintrayKey="${BINTRAY_API_KEY}" candidate | ||
- name: Release build | ||
if: steps.release_info.outputs.IS_CANDIDATE == 'false' | ||
env: | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
GRADLE_OPTS: -Xmx6g -Xms6g -Dorg.gradle.daemon=false | ||
run: | | ||
./gradlew -PenablePublishing=true --info -Prelease.disableGitChecks=true -Prelease.useLastTag=true -PbintrayUser="${BINTRAY_USER}" -PbintrayKey="${BINTRAY_API_KEY}" final | ||
- name: Create release | ||
if: steps.release_info.outputs.SKIP_RELEASE == 'false' | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.event.repository.name }} ${{ github.ref }} | ||
body: | | ||
${{ steps.release_info.outputs.CHANGELOG }} | ||
draft: false | ||
prerelease: ${{ steps.release_info.outputs.IS_CANDIDATE }} | ||
- name: Pause before dependency bump | ||
run: sleep 300 | ||
- name: Trigger dependency bump workflow | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.SPINNAKER_GITHUB_TOKEN }} | ||
event-type: bump-dependencies | ||
client-payload: '{"ref": "${{ github.ref }}"}' |