From 139a5a47beeb95be44d80e05294b4b6bddd1e110 Mon Sep 17 00:00:00 2001 From: Kanika Pasrija <58769601+kanika1894@users.noreply.github.com> Date: Mon, 14 Jun 2021 12:15:46 +0530 Subject: [PATCH] Secure value big fix (#52) * Create defaultLabels.yml (#49) * Create defaultLabels.yml * Update defaultLabels.yml * Update defaultLabels.yml (#50) * use secureValue for secure env variables (#51) * use secureValue for secure env variables ContainerInstanceManagementModels.EnvironmentVariable has a property, secureValue, which should be used for secure environment variables. * Update README.md Clarify usage of secure-environment-variables. You should specify them as Secrets. Co-authored-by: el-pato --- .github/workflows/defaultLabels.yml | 35 +++++++++++++++++++++++++++++ README.md | 2 +- src/taskparameters.ts | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/defaultLabels.yml diff --git a/.github/workflows/defaultLabels.yml b/.github/workflows/defaultLabels.yml new file mode 100644 index 00000000..a4c73684 --- /dev/null +++ b/.github/workflows/defaultLabels.yml @@ -0,0 +1,35 @@ +name: setting-default-labels + +# Controls when the action will run. +on: + schedule: + - cron: "0 0/3 * * *" + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/stale@v3 + name: Setting issue as idle + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue is idle because it has been open for 14 days with no activity.' + stale-issue-label: 'idle' + days-before-stale: 14 + days-before-close: -1 + operations-per-run: 100 + exempt-issue-labels: 'backlog' + + - uses: actions/stale@v3 + name: Setting PR as idle + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-pr-message: 'This PR is idle because it has been open for 14 days with no activity.' + stale-pr-label: 'idle' + days-before-stale: 14 + days-before-close: -1 + operations-per-run: 100 diff --git a/README.md b/README.md index 89f043c8..8d6ed0b0 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ jobs: ### Deploying a Container with Environment Variables and Command Line -**NOTE**: Secure Environment Variables aren't masked by the Action so use them as Secrets if you want to hide them +**NOTE**: The values of ```secure-environment-variables``` will not be shown in the properties of the Azure Container Instance, but **will** be shown in the logs of the GitHub Action unless you specify them as Secrets. ```yaml - uses: Azure/aci-deploy@v1 diff --git a/src/taskparameters.ts b/src/taskparameters.ts index 5dd40fe2..8215dca6 100644 --- a/src/taskparameters.ts +++ b/src/taskparameters.ts @@ -159,7 +159,7 @@ export class TaskParameters { let pairList = pair.split(/=(?:"(.+)"|(.+))/); let obj: ContainerInstanceManagementModels.EnvironmentVariable = { "name": pairList[0], - "value": pairList[1] || pairList[2] + "secureValue": pairList[1] || pairList[2] }; this._environmentVariables.push(obj); })