From c0388ab30cb33235281890ca6e236d4addb7e0e4 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 08:55:45 -0500 Subject: [PATCH 01/17] update registries and improve GHA Builds all PRs and pushes to main, making PRs :devel and pushes to main :latest. The built PR image tags will be commented on the PR --- .github/workflows/bsod-api-container.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 19cacae..25136b6 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -4,12 +4,15 @@ on: push: branches: - main + pull_request: + branches: + - main workflow_dispatch: env: REGISTRY: ghcr.io - REPO: pipeittodevnull - IMAGE: bsod-api + REPO: r-techsupport + IMAGE: webdbg-api jobs: build_and_push: @@ -18,7 +21,7 @@ jobs: packages: write steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: true @@ -31,5 +34,10 @@ jobs: - name: Build and push run: | - docker build -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE}}:latest api/ - docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE}}:latest \ No newline at end of file + TAG=$([[ ${{ github.ref }} == refs/heads/main ]] && echo "latest" || echo "devel") + docker build -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ github.sha.slice(0, 7) }} api/ + docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG + docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ github.sha.slice(0, 7) }} + + - name: Log out from the Container registry + run: docker logout ${{ env.REGISTRY }} From 3e1f804906d8b11dbbdfdc40e0742d93cbfbaea4 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 08:58:42 -0500 Subject: [PATCH 02/17] make sha in its own step --- .github/workflows/bsod-api-container.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 25136b6..4b131b2 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -25,6 +25,9 @@ jobs: with: submodules: true + - name: Set short SHA + run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV + - name: Log in to the Container registry uses: docker/login-action@v3 with: @@ -35,9 +38,23 @@ jobs: - name: Build and push run: | TAG=$([[ ${{ github.ref }} == refs/heads/main ]] && echo "latest" || echo "devel") - docker build -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ github.sha.slice(0, 7) }} api/ + docker build -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHORT_SHA api/ docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG - docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ github.sha.slice(0, 7) }} + docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHORT_SHA - name: Log out from the Container registry run: docker logout ${{ env.REGISTRY }} + + - name: Comment on the PR + if: github.event_name == 'pull_request' + uses: actions/github-script@v6 + with: + script: | + const tag = '${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.TAG }}'; + const shortSha = '${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }}'; + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: `Docker images have been built and pushed:\n- \`${tag}\`\n- \`${shortSha}\`` + }); From c6bb1d9d2fee4ebe873f1ba93dd4ffc2a31bd508 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:01:45 -0500 Subject: [PATCH 03/17] this is PS silly --- .github/workflows/bsod-api-container.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 4b131b2..b173535 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -18,6 +18,8 @@ jobs: build_and_push: runs-on: windows-2022 permissions: + contents: write + pull-requests: write packages: write steps: - name: Checkout code @@ -37,10 +39,14 @@ jobs: - name: Build and push run: | - TAG=$([[ ${{ github.ref }} == refs/heads/main ]] && echo "latest" || echo "devel") - docker build -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHORT_SHA api/ - docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG - docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHORT_SHA + if ($env:GITHUB_REF -eq 'refs/heads/main') { + $TAG = 'latest' + } else { + $TAG = 'devel' + } + docker build -t $env:REGISTRY/$env:REPO/$env:IMAGE:$TAG -t $env:REGISTRY/$env:REPO/$env:IMAGE:$env:SHORT_SHA api/ + docker push $env:REGISTRY/$env:REPO/$env:IMAGE:$TAG + docker push $env:REGISTRY/$env:REPO/$env:IMAGE:$env:SHORT_SHA - name: Log out from the Container registry run: docker logout ${{ env.REGISTRY }} From 035b5183e6afce41578f438e5e1aea87f18ff815 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:09:20 -0500 Subject: [PATCH 04/17] more attempts --- .github/workflows/bsod-api-container.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index b173535..d0027da 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -44,9 +44,12 @@ jobs: } else { $TAG = 'devel' } - docker build -t $env:REGISTRY/$env:REPO/$env:IMAGE:$TAG -t $env:REGISTRY/$env:REPO/$env:IMAGE:$env:SHORT_SHA api/ - docker push $env:REGISTRY/$env:REPO/$env:IMAGE:$TAG - docker push $env:REGISTRY/$env:REPO/$env:IMAGE:$env:SHORT_SHA + docker build ` + -t ${{ env.REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:$TAG ` + -t ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:${{ env:SHORT_SHA }} ` + api/ + docker push ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:$TAG + docker push ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:${{ env:SHORT_SHA }} - name: Log out from the Container registry run: docker logout ${{ env.REGISTRY }} From 12ed68a59fcb9a575b2955f1d2ace0024b552fbe Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:12:00 -0500 Subject: [PATCH 05/17] more attempts --- .github/workflows/bsod-api-container.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index d0027da..70a0c33 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -44,10 +44,7 @@ jobs: } else { $TAG = 'devel' } - docker build ` - -t ${{ env.REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:$TAG ` - -t ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:${{ env:SHORT_SHA }} ` - api/ + docker build -t ${{ env.REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:$TAG -t ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:${{ env:SHORT_SHA }} api/ docker push ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:$TAG docker push ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:${{ env:SHORT_SHA }} From 5db8ac18f549699aad4a9bdcb8423a1d7279a6eb Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:14:46 -0500 Subject: [PATCH 06/17] more attempts --- .github/workflows/bsod-api-container.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 70a0c33..fb9ee41 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -44,9 +44,12 @@ jobs: } else { $TAG = 'devel' } - docker build -t ${{ env.REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:$TAG -t ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:${{ env:SHORT_SHA }} api/ - docker push ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:$TAG - docker push ${{ env:REGISTRY }}/${{ env:REPO }}/${{ env:IMAGE }}:${{ env:SHORT_SHA }} + docker build -t ` + ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG ` + -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} ` + api/ + docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG + docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} - name: Log out from the Container registry run: docker logout ${{ env.REGISTRY }} From 14f8028d6992e29393da72bea0a78aa4336f478c Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:17:32 -0500 Subject: [PATCH 07/17] more attempts --- .github/workflows/bsod-api-container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index fb9ee41..780d998 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -39,7 +39,7 @@ jobs: - name: Build and push run: | - if ($env:GITHUB_REF -eq 'refs/heads/main') { + if (${{ env.GITHUB_REF }} -eq 'refs/heads/main') { $TAG = 'latest' } else { $TAG = 'devel' From 76d212ba1b85c06043a7df0fbc9564b374aa26d1 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:18:42 -0500 Subject: [PATCH 08/17] more attempts --- .github/workflows/bsod-api-container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 780d998..a82e30e 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -39,7 +39,7 @@ jobs: - name: Build and push run: | - if (${{ env.GITHUB_REF }} -eq 'refs/heads/main') { + if ("${{ env.GITHUB_REF }}" -eq 'refs/heads/main') { $TAG = 'latest' } else { $TAG = 'devel' From d4b01a8ca757e8d2c1149cec0d899557df79dcd1 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:22:07 -0500 Subject: [PATCH 09/17] more attempts --- .github/workflows/bsod-api-container.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index a82e30e..69c9aae 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -39,7 +39,7 @@ jobs: - name: Build and push run: | - if ("${{ env.GITHUB_REF }}" -eq 'refs/heads/main') { + if ("${{ github.ref }}" -eq 'refs/heads/main') { $TAG = 'latest' } else { $TAG = 'devel' From 5814d21bef3e069cb089f3ee3887c6bb18bb05a0 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:26:17 -0500 Subject: [PATCH 10/17] more attempts --- .github/workflows/bsod-api-container.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 69c9aae..138819e 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -28,7 +28,7 @@ jobs: submodules: true - name: Set short SHA - run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV + run: echo "SHORT_SHA=${{ GITHUB_SHA::7 }}" >> $GITHUB_ENV - name: Log in to the Container registry uses: docker/login-action@v3 @@ -44,6 +44,7 @@ jobs: } else { $TAG = 'devel' } + Write-Host "Using tag: $TAG" docker build -t ` ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG ` -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} ` From cb3242cbfd5c1440691f5e5e085716a78bc5c619 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:28:20 -0500 Subject: [PATCH 11/17] more attempts --- .github/workflows/bsod-api-container.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 138819e..f4ee1fd 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -27,9 +27,6 @@ jobs: with: submodules: true - - name: Set short SHA - run: echo "SHORT_SHA=${{ GITHUB_SHA::7 }}" >> $GITHUB_ENV - - name: Log in to the Container registry uses: docker/login-action@v3 with: @@ -39,11 +36,14 @@ jobs: - name: Build and push run: | + $SHORT_SHA = "${{ github.sha }}"[0..6] -join '' + if ("${{ github.ref }}" -eq 'refs/heads/main') { $TAG = 'latest' } else { $TAG = 'devel' } + Write-Host "Using tag: $TAG" docker build -t ` ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG ` From 885b381643efba70b256298aade63c4a559c6ae8 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:30:32 -0500 Subject: [PATCH 12/17] more attempts --- .github/workflows/bsod-api-container.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index f4ee1fd..92eeddb 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -36,7 +36,7 @@ jobs: - name: Build and push run: | - $SHORT_SHA = "${{ github.sha }}"[0..6] -join '' + $SHA = "${{ github.sha }}"[0..6] -join '' if ("${{ github.ref }}" -eq 'refs/heads/main') { $TAG = 'latest' @@ -45,12 +45,14 @@ jobs: } Write-Host "Using tag: $TAG" + Write-Host "Using SHA: $SHA" + docker build -t ` ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG ` - -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} ` + -t ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHA ` api/ docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$TAG - docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }} + docker push ${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:$SHA - name: Log out from the Container registry run: docker logout ${{ env.REGISTRY }} From 5ccb31a7164f3153972110a99f948594f95ba4c5 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 09:44:42 -0500 Subject: [PATCH 13/17] correct PR comment and Dockerfile labels --- .github/workflows/bsod-api-container.yaml | 7 ++++--- api/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 92eeddb..1f1d0b2 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -37,6 +37,7 @@ jobs: - name: Build and push run: | $SHA = "${{ github.sha }}"[0..6] -join '' + echo "SHA=$SHA" >> $env:GITHUB_ENV if ("${{ github.ref }}" -eq 'refs/heads/main') { $TAG = 'latest' @@ -62,11 +63,11 @@ jobs: uses: actions/github-script@v6 with: script: | - const tag = '${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.TAG }}'; - const shortSha = '${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHORT_SHA }}'; + const tagImage = '${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.TAG }}'; + const shaImage = '${{ env.REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE }}:${{ env.SHA }}'; github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, - body: `Docker images have been built and pushed:\n- \`${tag}\`\n- \`${shortSha}\`` + body: `Docker images have been built and pushed:\n- \`${tagImage}\`\n- \`${shaImage}\`` }); diff --git a/api/Dockerfile b/api/Dockerfile index c68deb3..0b941e2 100755 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -22,5 +22,5 @@ EXPOSE 3000 # Start the application CMD ["node", "api.js"] -LABEL org.opencontainers.image.source https://github.com/PipeItToDevNull/bsod-api +LABEL org.opencontainers.image.source https://github.com/r-Techsupport/WebDBG LABEL org.opencontainers.image.description A BSOD debug API using WinDebug-Container \ No newline at end of file From 3d4a111c3fa19386d4c52fc8b70487009145a35e Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 10:00:29 -0500 Subject: [PATCH 14/17] add tag for pr comment --- .github/workflows/bsod-api-container.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bsod-api-container.yaml b/.github/workflows/bsod-api-container.yaml index 1f1d0b2..c5a9f34 100644 --- a/.github/workflows/bsod-api-container.yaml +++ b/.github/workflows/bsod-api-container.yaml @@ -37,7 +37,6 @@ jobs: - name: Build and push run: | $SHA = "${{ github.sha }}"[0..6] -join '' - echo "SHA=$SHA" >> $env:GITHUB_ENV if ("${{ github.ref }}" -eq 'refs/heads/main') { $TAG = 'latest' @@ -45,6 +44,9 @@ jobs: $TAG = 'devel' } + echo "SHA=$SHA" >> $env:GITHUB_ENV + echo "TAG=$TAG" >> $env:GITHUB_ENV + Write-Host "Using tag: $TAG" Write-Host "Using SHA: $SHA" From b140c24b921c88cfa6cc940337eb195d45d512bd Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 10:05:49 -0500 Subject: [PATCH 15/17] remove template properly --- template.json | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 template.json diff --git a/template.json b/template.json deleted file mode 100644 index f386057..0000000 --- a/template.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [ - { - "type": "Microsoft.Web/staticSites", - "apiVersion": "2022-09-01", - "name": "WebDBG", - "location": "East US 2", - "properties": { - "repositoryUrl": "https://github.com/r-Techsupport/WebDBG", - "branch": "main", - "buildProperties": { - "appLocation": "/swa", - "outputLocation": "build" - } - }, - "sku": { - "name": "Free", - "tier": "Free" - } - } - ] -} From 695ab030c64e77e21310058f3f2aa5e6a64de38c Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 10:13:13 -0500 Subject: [PATCH 16/17] moved non-sensitive secrets to variables --- .github/workflows/azure-swa.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure-swa.yml b/.github/workflows/azure-swa.yml index 8264f70..b59edeb 100644 --- a/.github/workflows/azure-swa.yml +++ b/.github/workflows/azure-swa.yml @@ -25,9 +25,9 @@ jobs: - name: Create .env file uses: SpicyPizza/create-envfile@v1 with: - envkey_REACT_APP_SITE_NAME: ${{ secrets.REACT_APP_SITE_NAME }} - envkey_REACT_APP_REPO_URL: ${{ secrets.REACT_APP_REPO_URL }} - envkey_REACT_APP_API_URL: ${{ secrets.REACT_APP_API_URL }} + envkey_REACT_APP_SITE_NAME: ${{ variables.REACT_APP_SITE_NAME }} + envkey_REACT_APP_REPO_URL: ${{ variables.REACT_APP_REPO_URL }} + envkey_REACT_APP_API_URL: ${{ variables.REACT_APP_API_URL }} directory: swa - name: Build And Deploy From 0683f988b2749ba937fe76445a173c8c0260e781 Mon Sep 17 00:00:00 2001 From: PipeItToDevNull Date: Sun, 8 Dec 2024 10:15:21 -0500 Subject: [PATCH 17/17] moved non-sensitive secrets to variables --- .github/workflows/azure-swa.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure-swa.yml b/.github/workflows/azure-swa.yml index b59edeb..4e6cbd5 100644 --- a/.github/workflows/azure-swa.yml +++ b/.github/workflows/azure-swa.yml @@ -25,9 +25,9 @@ jobs: - name: Create .env file uses: SpicyPizza/create-envfile@v1 with: - envkey_REACT_APP_SITE_NAME: ${{ variables.REACT_APP_SITE_NAME }} - envkey_REACT_APP_REPO_URL: ${{ variables.REACT_APP_REPO_URL }} - envkey_REACT_APP_API_URL: ${{ variables.REACT_APP_API_URL }} + envkey_REACT_APP_SITE_NAME: ${{ vars.REACT_APP_SITE_NAME }} + envkey_REACT_APP_REPO_URL: ${{ vars.REACT_APP_REPO_URL }} + envkey_REACT_APP_API_URL: ${{ vars.REACT_APP_API_URL }} directory: swa - name: Build And Deploy