From 6407307718ea446e2c69770eda00c5c2f1c8879b Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Wed, 16 Feb 2022 17:13:56 +0200 Subject: [PATCH] ci: fix deployments of npm & deno branches (#3502) --- .github/workflows/deploy-artifact-as-branch.yml | 6 ++++++ .github/workflows/push.yml | 8 ++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-artifact-as-branch.yml b/.github/workflows/deploy-artifact-as-branch.yml index ecd7e554ca..4d11caa0f5 100644 --- a/.github/workflows/deploy-artifact-as-branch.yml +++ b/.github/workflows/deploy-artifact-as-branch.yml @@ -2,6 +2,9 @@ name: Deploy specified artifact as a branch on: workflow_call: inputs: + environment: + required: true + type: string artifact_name: required: true type: string @@ -13,6 +16,9 @@ on: type: string jobs: deploy-artifact-as-branch: + environment: + name: ${{ inputs.environment }} + url: ${{ github.server_url }}/${{ github.repository }}/tree/${{ inputs.target_branch }} runs-on: ubuntu-latest steps: - name: Checkout `${{ inputs.target_branch }}` branch diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e97532e807..30e42d1379 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,11 +7,9 @@ jobs: name: Deploy to `npm` branch needs: ci if: github.ref == 'refs/heads/main' - environment: - name: npm-branch - url: https://github.com/graphql/graphql-js/tree/npm uses: ./.github/workflows/deploy-artifact-as-branch.yml with: + environment: npm-branch artifact_name: npmDist target_branch: npm commit_message: "Deploy ${{github.event.workflow_run.head_sha}} to 'npm' branch" @@ -20,11 +18,9 @@ jobs: name: Deploy to `deno` branch needs: ci if: github.ref == 'refs/heads/main' - environment: - name: deno-branch - url: https://github.com/graphql/graphql-js/tree/deno uses: ./.github/workflows/deploy-artifact-as-branch.yml with: + environment: deno-branch artifact_name: denoDist target_branch: deno commit_message: "Deploy ${{github.event.workflow_run.head_sha}} to 'deno' branch"