From a99e0ebf73bc22882d17142fb251a443126e6d01 Mon Sep 17 00:00:00 2001 From: David Bloss Date: Wed, 11 Dec 2024 08:47:16 -0600 Subject: [PATCH 1/3] mask integration_url and bump gh action version --- .github/workflows/release.yml | 2 +- action.yml | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1f1293e..5a90d25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ORG_GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_TOKEN }} - name: Report Release To OpsLevel - uses: opslevel/report-deploy-github-action@v1.0.0 + uses: opslevel/report-deploy-github-action@v2.0.0 with: integration_url: ${{ secrets.DEPLOY_INTEGRATION_URL }} service: "report_deploy_github_action" diff --git a/action.yml b/action.yml index b2813fb..f6b50ff 100644 --- a/action.yml +++ b/action.yml @@ -47,11 +47,17 @@ inputs: runs: using: "composite" steps: + - name: Mask inputs + shell: bash + run: | + INTEGRATION_URL=$(jq -r 'inputs.integration_url' $GITHUB_EVENT_PATH) + echo ::add-mask::$INTEGRATION_URL + echo "INTEGRATION_URL=$INTEGRATION_URL" >> $GITHUB_ENV - name: Do it with Docker if: ${{ inputs.use_docker == 'true' }} - uses: OpsLevel/report-deploy-github-action/with-docker@v1.0.0 + uses: OpsLevel/report-deploy-github-action/with-docker@v2.0.0 with: - integration_url: ${{ inputs.integration_url }} + integration_url: ${{ env.INTEGRATION_URL }} deduplication_id: ${{ inputs.deduplication_id }} deployer_email: ${{ inputs.deployer_email }} deploy_url: ${{ inputs.deploy_url }} @@ -60,16 +66,13 @@ runs: environment: ${{ inputs.environment }} number: ${{ inputs.number }} service: ${{ inputs.service }} - - name: Install OpsLevel cli + - name: Setup OpsLevel CLI if: ${{ inputs.use_docker != 'true' }} - shell: bash - run: | - curl -sLS https://raw.githubusercontent.com/OpsLevel/cli/main/install.sh | sudo sh + uses: opslevel/actions/setup-cli@v1 - name: Report Deploy to OpsLevel if: ${{ inputs.use_docker != 'true' }} shell: bash run: | - echo ::add-mask::$INTEGRATION_URL cat < data.yaml service: "${{ inputs.service }}" description: "${{ inputs.description }}" @@ -81,6 +84,4 @@ runs: name: "${{ inputs.deployer_name }}" email: "${{ inputs.deployer_email }}" EOF - opslevel create deploy -i "${INTEGRATION_URL}" -f . - env: - INTEGRATION_URL: ${{ inputs.integration_url }} + opslevel create deploy -i "${{ env.INTEGRATION_URL }}" -f . From 586b310ebdba6fb81bbb99c76c3158d80e2f29b2 Mon Sep 17 00:00:00 2001 From: David Bloss Date: Wed, 11 Dec 2024 09:32:02 -0600 Subject: [PATCH 2/3] CI job rename --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f6b50ff..64e9f9b 100644 --- a/action.yml +++ b/action.yml @@ -66,7 +66,7 @@ runs: environment: ${{ inputs.environment }} number: ${{ inputs.number }} service: ${{ inputs.service }} - - name: Setup OpsLevel CLI + - name: Install OpsLevel CLI if: ${{ inputs.use_docker != 'true' }} uses: opslevel/actions/setup-cli@v1 - name: Report Deploy to OpsLevel From e538c96c989c08905032db6dd3a018cb7c19341b Mon Sep 17 00:00:00 2001 From: David Bloss Date: Wed, 11 Dec 2024 09:40:18 -0600 Subject: [PATCH 3/3] fix github workflow test --- action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 64e9f9b..af2e517 100644 --- a/action.yml +++ b/action.yml @@ -50,14 +50,14 @@ runs: - name: Mask inputs shell: bash run: | - INTEGRATION_URL=$(jq -r 'inputs.integration_url' $GITHUB_EVENT_PATH) - echo ::add-mask::$INTEGRATION_URL - echo "INTEGRATION_URL=$INTEGRATION_URL" >> $GITHUB_ENV + set +v + echo ::add-mask::${{ inputs.integration_url }} + set -v - name: Do it with Docker if: ${{ inputs.use_docker == 'true' }} uses: OpsLevel/report-deploy-github-action/with-docker@v2.0.0 with: - integration_url: ${{ env.INTEGRATION_URL }} + integration_url: ${{ inputs.integration_url }} deduplication_id: ${{ inputs.deduplication_id }} deployer_email: ${{ inputs.deployer_email }} deploy_url: ${{ inputs.deploy_url }} @@ -84,4 +84,4 @@ runs: name: "${{ inputs.deployer_name }}" email: "${{ inputs.deployer_email }}" EOF - opslevel create deploy -i "${{ env.INTEGRATION_URL }}" -f . + opslevel create deploy -i "${{ inputs.integration_url }}" -f .