Skip to content

Commit

Permalink
round 1...
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Apr 15, 2024
1 parent 9f2ad46 commit 412ccbd
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 170 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Build
on:
push:
branches:
# - master
# - 'release-*'
- richard-dev
tags:
# - 'v*'
- 'richard-dev-v*'
env:
BUILD_DEBUG:
CI_BRANCH:
CI_BUILD_TAG:
jobs:
set-envs:
runs-on: ubuntu-latest
steps:
- if: ${{ github.event.action == 'branches' }}
name: Set Branch Env
run: echo "CI_BRANCH=$(github.ref_name)" >> $GITHUB_ENV
- if: ${{ github.event.action == 'tags' }}
name: Set Tag Env
run: echo "CI_BUILD_TAG=$(github.ref_name)" >> $GITHUB_ENV
test:
uses: ./.github/workflows/test.yaml
build:
runs-on: ubuntu-latest
needs: [set-envs, test]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Run Setup
uses: ./.github/actions/setup

- id: build
name: Build
# -l -v latest2
run: ./scripts/build-static

- name: Archive build
uses: actions/upload-artifact@v4
with:
name: BUILD_DIR
path: ${{ steps.build.outputs.BUILD_DIR }}
retention-days: 1

- name: Archive build
uses: actions/upload-artifact@v4
with:
name: BUILD_TGZ
path: ${{ steps.build.outputs.BUILD_TGZ }}
retention-days: 1
# upload:
# runs-on: ubuntu-latest
# needs: build
# permissions:
# contents: 'read'
# id-token: 'write'
# env:
# GS_BUCKET_NAME:
# steps:
# - name: Download build directory
# uses: actions/download-artifact@v4
# with:
# name: BUILD_DIR
# path: build_dir
# - name: Download build tar
# uses: actions/download-artifact@v4
# with:
# name: BUILD_TGZ
# path: build_tgz
# # https://github.com/google-github-actions/auth
# - name: auth
# uses: 'google-github-actions/auth@v2'
# with:
# credentials_json: ''
# # workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
# # service_account: 'my-service-account@my-project.iam.gserviceaccount.com'
# # https://github.com/google-github-actions/upload-cloud-storage
# - name: upload build
# uses: 'google-github-actions/upload-cloud-storage@v2'
# with:
# path: build_dir
# # https://releases.rancher.com/ui/2.8.0/...
# destination: releases.rancher.com/ui/${{ env.VERSION }}
# parent: false
# headers: |-
# cache-control: no-cache,must-revalidate
# - name: upload tar
# uses: 'google-github-actions/upload-cloud-storage@v2'
# with:
# path: build_tgz
# # https://releases.rancher.com/ui/2.8.0.tar.gz
# destination: releases.rancher.com/ui
# parent: false

#project_id
# GS_PROJECT_NAME 'Rancher'
# VERSION
# CDN="releases.rancher.com/ui"
# GS_URL="${GS_URL:-gs://${CDN}}"
# https://releases.rancher.com/ui/latest2/index.html
14 changes: 11 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ on:
- master
- 'release-*'
pull_request:
branches:
- master
- 'release-*'
branches:
- master
- 'release-*'
workflow_call:
# inputs:
# config-path:
# required: true
# type: string
# secrets:
# envPAT:
# required: true

jobs:
unit-test:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "master-dev",
"version": "richard-dev",
"private": true,
"repository": "https://github.com/rancher/ui",
"license": "Apache-2.0",
Expand Down Expand Up @@ -141,4 +141,4 @@
"lib/shared"
]
}
}
}
Loading

0 comments on commit 412ccbd

Please sign in to comment.