round 1... #1
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
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 | ||
Check failure on line 26 in .github/workflows/build.yaml GitHub Actions / .github/workflows/build.yamlInvalid workflow file
|
||
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 |