From 90d6bf263d86b4119028bd5d4d39619f7add2c0e Mon Sep 17 00:00:00 2001 From: sk593 Date: Tue, 2 Jul 2024 12:58:38 -0700 Subject: [PATCH] testing Signed-off-by: sk593 --- .github/workflows/publish-bicep.yaml | 122 +++++++++++++-------------- 1 file changed, 59 insertions(+), 63 deletions(-) diff --git a/.github/workflows/publish-bicep.yaml b/.github/workflows/publish-bicep.yaml index 17af6916..d7b83c80 100644 --- a/.github/workflows/publish-bicep.yaml +++ b/.github/workflows/publish-bicep.yaml @@ -28,65 +28,65 @@ env: AWS_REGION: us-west-2 jobs: - build-and-push-bicep-types: - name: Publish Radius bicep types to ACR - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Parse release version and set environment variables - run: python ./.github/scripts/get_release_version.py - - name: Set up Go ${{ env.GOVER }} - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GOVER }} - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: '18' - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - name: 'Build aws-type-downloader' - env: - GOPROXY: "https://proxy.golang.org" - working-directory: 'src/aws-type-downloader' - run: go build . - - name: Download AWS specs from CloudControl - run: | - cd src/aws-type-downloader && go run main.go --output ../../artifacts/types --clean - - name: 'Initialize submodule' - run: | - git submodule update --init --recursive - npm --prefix bicep-types/src/bicep-types ci && npm --prefix bicep-types/src/bicep-types run build; \ - - name: Generate Bicep extensibility types for AWS - run: | - npm --prefix ./src/aws-type-generator install - npm run --prefix ./src/aws-type-generator start -- --input ../../artifacts/types --output ../../artifacts/bicep --release-version ${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} - - name: Upload AWS Bicep types artifacts - uses: actions/upload-artifact@v4 - with: - name: aws-bicep-types - path: ./artifacts/bicep - if-no-files-found: error - - name: 'Login via Azure CLI' - if: github.repository == 'radius-project/bicep-types-aws' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) - uses: azure/login@v1 - with: - creds: ${{ secrets.BICEP_TYPES_AZURE_CREDENTIALS }} - - name: Setup and verify bicep CLI - if: github.repository == 'radius-project/bicep-types-aws' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) - run: | - curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 - chmod +x ./bicep - bicep --version - - name: Publish bicep types - if: github.repository == 'radius-project/bicep-types-aws' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) - run: | - bicep publish-provider ./artifacts/bicep/index.json --target br:${{ env.BICEP_TYPES_REGISTRY }}/aws:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force + # build-and-push-bicep-types: + # name: Publish Radius bicep types to ACR + # runs-on: ubuntu-latest + # steps: + # - name: Check out code + # uses: actions/checkout@v4 + # - name: Parse release version and set environment variables + # run: python ./.github/scripts/get_release_version.py + # - name: Set up Go ${{ env.GOVER }} + # uses: actions/setup-go@v5 + # with: + # go-version: ${{ env.GOVER }} + # - name: Setup Node.js + # uses: actions/setup-node@v2 + # with: + # node-version: '18' + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # aws-region: ${{ env.AWS_REGION }} + # - name: 'Build aws-type-downloader' + # env: + # GOPROXY: "https://proxy.golang.org" + # working-directory: 'src/aws-type-downloader' + # run: go build . + # - name: Download AWS specs from CloudControl + # run: | + # cd src/aws-type-downloader && go run main.go --output ../../artifacts/types --clean + # - name: 'Initialize submodule' + # run: | + # git submodule update --init --recursive + # npm --prefix bicep-types/src/bicep-types ci && npm --prefix bicep-types/src/bicep-types run build; \ + # - name: Generate Bicep extensibility types for AWS + # run: | + # npm --prefix ./src/aws-type-generator install + # npm run --prefix ./src/aws-type-generator start -- --input ../../artifacts/types --output ../../artifacts/bicep --release-version ${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} + # - name: Upload AWS Bicep types artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: aws-bicep-types + # path: ./artifacts/bicep + # if-no-files-found: error + # - name: 'Login via Azure CLI' + # if: github.repository == 'radius-project/bicep-types-aws' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) + # uses: azure/login@v1 + # with: + # creds: ${{ secrets.BICEP_TYPES_AZURE_CREDENTIALS }} + # - name: Setup and verify bicep CLI + # if: github.repository == 'radius-project/bicep-types-aws' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) + # run: | + # curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 + # chmod +x ./bicep + # bicep --version + # - name: Publish bicep types + # if: github.repository == 'radius-project/bicep-types-aws' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) + # run: | + # bicep publish-provider ./artifacts/bicep/index.json --target br:${{ env.BICEP_TYPES_REGISTRY }}/aws:${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} --force update-types: name: Update Bicep extensibility provider types runs-on: ubuntu-latest @@ -116,10 +116,6 @@ jobs: mkdir -p workflow-temp/bicep/src/Bicep.Types.Aws/generated cp -R artifacts/bicep/* workflow-temp/bicep/src/Bicep.Types.Aws/generated - - name: Find GH pull request number - run: | - echo ${{ github.event.pull_request.number }} - - name: Create Pull Request in radius-project/bicep repo uses: peter-evans/create-pull-request@v4 with: