diff --git a/.github/workflows/build-and-upload.yaml b/.github/workflows/build-and-upload.yaml index 2853eb2028..77deeec738 100644 --- a/.github/workflows/build-and-upload.yaml +++ b/.github/workflows/build-and-upload.yaml @@ -23,28 +23,28 @@ jobs: with: fetch-depth: 1 - - name: Setup local environment + - name: Setup env uses: ./.github/actions/setup - id: build name: Build run: ./scripts/build-static - - name: fFetch gcs auth + - 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 - # https://github.com/google-github-actions/auth - - name: auth with gcs + - name: Apply gcs auth + # https://github.com/google-github-actions/auth uses: 'google-github-actions/auth@v2' with: credentials_json: "${{ env.GOOGLE_AUTH }}" - # https://github.com/google-github-actions/upload-cloud-storage - - name: upload build + - 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/... @@ -52,8 +52,9 @@ jobs: parent: false headers: |- cache-control: no-cache,must-revalidate + process_gcloudignore: false - - name: upload tar + - name: Upload tar if: ${{ env.CI_BUILD_TAG != ''}} uses: 'google-github-actions/upload-cloud-storage@v2' with: @@ -63,78 +64,4 @@ jobs: parent: false headers: |- cache-control: no-cache,must-revalidate - - - - - # # TODO RC if we can use upload permissions in a single job with build then these aren't needed - # - name: Stash build (files) - # uses: actions/upload-artifact@v4 - # with: - # name: BUILD_DIR - # path: ${{ steps.build.outputs.BUILD_DIR }} - # retention-days: 1 - - # - name: Stash build (archive file) - # if: ${{ env.CI_BUILD_TAG != ''}} - # uses: actions/upload-artifact@v4 - # with: - # name: BUILD_TGZ - # path: ${{ steps.build.outputs.BUILD_TGZ }} - # retention-days: 1 - - # - name: Stash VERSION - # run: echo "VERSION=${{ steps.build.outputs.VERSION }}" >> "$GITHUB_OUTPUT" - # upload: - # runs-on: ubuntu-latest - # needs: build - # # 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 - # if: ${{ env.CI_BUILD_TAG != ''}} - # uses: actions/download-artifact@v4 - # with: - # name: BUILD_TGZ - # path: build_tgz - # # - name: version (TODO RC remove) - # # run: echo ${{needs.build.outputs.VERSION}} - # # - name: build_dir output (TODO RC remove) - # # run: ls -l build_dir - # - name: build_tgz output (TODO RC remove) - # if: ${{ env.CI_BUILD_TAG != ''}} - # run: ls -l build_tgz - # - uses: rancher-eio/read-vault-secrets@main - # with: - # secrets: | - # secret/data/github/repo/${{ github.repository }}/google-auth/rancher/credentials token | GOOGLE_AUTH - # # https://github.com/google-github-actions/auth - # - name: auth - # uses: 'google-github-actions/auth@v2' - # with: - # credentials_json: "${{ env.GOOGLE_AUTH }}" - # # https://github.com/google-github-actions/upload-cloud-storage - # - name: upload build - # uses: 'google-github-actions/upload-cloud-storage@v2' - # with: - # path: build_dir - # # Example - https://releases.rancher.com/ui/2.8.0/... - # destination: releases.rancher.com/${{ env.REPO }}/${{ needs.build.outputs.VERSION }} - # parent: false - # headers: |- - # cache-control: no-cache,must-revalidate - # - name: upload tar - # if: ${{ env.CI_BUILD_TAG != ''}} - # uses: 'google-github-actions/upload-cloud-storage@v2' - # with: - # path: 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 diff --git a/.github/workflows/build-branch.yaml b/.github/workflows/build-branch.yaml index 54d451724c..bc928ace99 100644 --- a/.github/workflows/build-branch.yaml +++ b/.github/workflows/build-branch.yaml @@ -5,7 +5,7 @@ on: # TODO RC - uncomment # - master # - 'release-*' - - richard-drone-ui + - richard-drone-ui-sjdkfldsgfdsf jobs: # test: # uses: ./.github/workflows/test.yaml diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index f81231d5b8..dadc19dae2 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -8,10 +8,13 @@ env: ENVIRONMENT: production jobs: - test: - uses: ./.github/workflows/test.yaml + # test: + # uses: ./.github/workflows/test.yaml build-and-upload: - needs: test uses: ./.github/workflows/build-and-upload.yaml + # needs: test + permissions: + contents: 'read' + id-token: 'write' with: CI_BUILD_TAG: ${{github.ref_name}}