forked from rancher/dashboard
-
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.
Merge branch 'epinio-standalone-actions' into epinio-dev
- Loading branch information
Showing
39 changed files
with
1,067 additions
and
123 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
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,61 @@ | ||
name: Build and Release Rancher Dashboard - Rancher Epinio Standalone | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'epinio-standalone-v*' | ||
|
||
env: | ||
OUTPUT_DIR: dist | ||
RELEASE_DIR: release | ||
ARTIFACT_NAME: rancher-dashboard-epinio-standalone-embed | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: Install & Build | ||
run: | ||
RANCHER_ENV=epinio ./.github/workflows/scripts/build-dashboard.sh | ||
|
||
- name: Upload Build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: ${{ env.RELEASE_DIR}}/${{ env.ARTIFACT_NAME }}* | ||
name: ${{ env.ARTIFACT_NAME }} | ||
if-no-files-found: error | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
persist-credentials: false | ||
- name: Download build | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: build | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Create Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create ${{ env.RELEASE_VERSION }} --prerelease | ||
- name: Upload Release Assets | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ env.RELEASE_VERSION }} build/${{ env.ARTIFACT_NAME }}.tar.gz build/${{ env.ARTIFACT_NAME }}.tar.gz.sha512sum |
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,32 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "GITHUB_SHA: $GITHUB_SHA" | ||
echo "GITHUB_REF_NAME: $GITHUB_REF_NAME" | ||
echo "ROUTER_BASE: $ROUTER_BASE" | ||
echo "RANCHER_ENV: $RANCHER_ENV" | ||
echo | ||
echo "RELEASE_DIR: $RELEASE_DIR" | ||
RELEASE_LOCATION="$RELEASE_DIR/$ARTIFACT_NAME" | ||
echo "RELEASE_LOCATION: $RELEASE_LOCATION" | ||
echo | ||
echo "ARTIFACT_NAME: $ARTIFACT_NAME" | ||
ARTIFACT_LOCATION="$OUTPUT_DIR/$ARTIFACT_NAME" | ||
echo "ARTIFACT_LOCATION: $ARTIFACT_LOCATION" | ||
echo | ||
echo "OUTPUT_DIR: $OUTPUT_DIR" | ||
|
||
echo Creating release directory | ||
mkdir $RELEASE_DIR | ||
|
||
echo Installing dependencies | ||
yarn install --frozen-lockfile | ||
|
||
echo Building | ||
NUXT_ENV_commit=$GITHUB_SHA NUXT_ENV_version=$GITHUB_REF_NAME OUTPUT_DIR="$ARTIFACT_LOCATION" ROUTER_BASE="$ROUTER_BASE" RANCHER_ENV=$RANCHER_ENV yarn run build --spa | ||
|
||
echo Creating tar | ||
tar -czf $RELEASE_LOCATION.tar.gz -C $ARTIFACT_LOCATION . | ||
|
||
echo Creating sha | ||
sha512sum $RELEASE_LOCATION.tar.gz > $RELEASE_LOCATION.tar.gz.sha512sum |
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
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
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
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
Oops, something went wrong.