-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5140 from richard-cox/richard-drone-ui-pr
Port drone build tasks to gh workflows + actions
- Loading branch information
Showing
14 changed files
with
145 additions
and
420 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
name: Setup UI Env | ||
description: Setup node, python and call bootstrap script | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14.x' | ||
|
||
- name: Install Python for node-sass | ||
shell: bash | ||
run: | | ||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2 | ||
- name: Install packages | ||
shell: bash | ||
run: ./scripts/bootstrap |
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,67 @@ | ||
name: Build and Upload | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
CI_BRANCH: | ||
required: false | ||
type: string | ||
CI_BUILD_TAG: | ||
required: false | ||
type: string | ||
|
||
env: | ||
CI_BRANCH: ${{inputs.CI_BRANCH || ''}} | ||
CI_BUILD_TAG: ${{inputs.CI_BUILD_TAG || ''}} | ||
REPO: ${{github.event.repository.name || ''}} | ||
|
||
jobs: | ||
build-and-upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup env | ||
uses: ./.github/actions/setup | ||
|
||
- id: build | ||
name: Build | ||
run: ./scripts/build-static | ||
|
||
- name: Get gcs auth | ||
uses: rancher-eio/read-vault-secrets@main | ||
with: | ||
secrets: | | ||
secret/data/github/repo/${{ github.repository }}/google-auth/rancher/credentials token | GOOGLE_AUTH | ||
- name: Apply gcs auth | ||
# https://github.com/google-github-actions/auth | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: "${{ env.GOOGLE_AUTH }}" | ||
|
||
- name: Upload build | ||
uses: 'google-github-actions/upload-cloud-storage@v2' | ||
# https://github.com/google-github-actions/upload-cloud-storage | ||
with: | ||
path: ${{steps.build.outputs.BUILD_DIR}} | ||
# Example - https://releases.rancher.com/ui/2.8.0/... | ||
destination: releases.rancher.com/${{ env.REPO }}/${{ steps.build.outputs.VERSION }} | ||
parent: false | ||
headers: |- | ||
cache-control: no-cache,must-revalidate | ||
process_gcloudignore: false | ||
|
||
- name: Upload tar | ||
if: ${{ env.CI_BUILD_TAG != ''}} | ||
uses: 'google-github-actions/upload-cloud-storage@v2' | ||
with: | ||
path: ${{steps.build.outputs.BUILD_TGZ}} | ||
# Example - https://releases.rancher.com/ui/2.8.0.tar.gz | ||
destination: releases.rancher.com/${{ env.REPO }} | ||
parent: false | ||
headers: |- | ||
cache-control: no-cache,must-revalidate | ||
process_gcloudignore: false |
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,19 @@ | ||
name: Build (Branch) | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'release-*' | ||
- '*-dev' | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yaml | ||
build-branch-and-upload: | ||
uses: ./.github/workflows/build-and-upload.yaml | ||
needs: test | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
with: | ||
CI_BRANCH: ${{github.ref_name}} |
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: Build (Release) | ||
on: | ||
push: | ||
tags: | ||
- v[2-9].* | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yaml | ||
build-tag-and-upload: | ||
uses: ./.github/workflows/build-and-upload.yaml | ||
needs: test | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
with: | ||
CI_BUILD_TAG: ${{github.ref_name}} |
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 |
---|---|---|
|
@@ -46,5 +46,3 @@ GTAGS | |
|
||
*.org | ||
yarn-error.log | ||
!Dockerfile.dapper | ||
Dockerfile.dapper* |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -141,4 +141,4 @@ | |
"lib/shared" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.