diff --git a/composite-actions/frontend-generic/e2e-test/action.yaml b/composite-actions/frontend-generic/e2e-test/action.yaml index e6d2904c..7a55b6b9 100644 --- a/composite-actions/frontend-generic/e2e-test/action.yaml +++ b/composite-actions/frontend-generic/e2e-test/action.yaml @@ -9,6 +9,10 @@ inputs: BUILD_TOOL: description: "Build tool" required: false + GAR_WORKFLOW: + description: "Use GAR auth workflow (true/false)" + required: false + default: "false" outputs: e2e_test_failed: @@ -18,6 +22,19 @@ outputs: runs: using: composite steps: + - name: Auth to GCP + if: inputs.GAR_WORKFLOW == 'true' + uses: extenda/actions/setup-gcloud@v0 + with: + service-account-key: ${{ inputs.GCLOUD_AUTH_STAGING }} + + - name: Run NPM auth script + if: inputs.GAR_WORKFLOW == 'true' + shell: bash + run: | + echo "@hiiretail:registry=https://europe-west1-npm.pkg.dev/extenda/npm/" > .npmrc + npm run auth -- --credential-config=./.npmrc + - name: Cache node_modules uses: actions/cache@v4 if: inputs.BUILD_TOOL == 'npm' diff --git a/composite-actions/frontend-generic/prod-cloud-deploy/action.yaml b/composite-actions/frontend-generic/prod-cloud-deploy/action.yaml index 7bd010e1..2c937953 100644 --- a/composite-actions/frontend-generic/prod-cloud-deploy/action.yaml +++ b/composite-actions/frontend-generic/prod-cloud-deploy/action.yaml @@ -1,47 +1,47 @@ -name: 'Cloud deploy prod' -description: 'Cloud deploy prod' +name: "Cloud deploy prod" +description: "Cloud deploy prod" inputs: SECRET_AUTH: - description: 'GCP Auth' + description: "GCP Auth" required: true GCLOUD_AUTH_STAGING: - description: 'GCP Auth (staging)' + description: "GCP Auth (staging)" required: true GCLOUD_AUTH_PROD: - description: 'GCP Auth (prod)' + description: "GCP Auth (prod)" required: true GITHUB_TOKEN: - description: 'GH token to create a release' + description: "GH token to create a release" LD_CLIENT_ID: - description: 'LaunchDarkly client ID in Secret Manager' + description: "LaunchDarkly client ID in Secret Manager" required: true IMAGE: - description: 'Image name for the service (without tag)' + description: "Image name for the service (without tag)" required: true DEPLOY_TO_STAGE: - description: 'Deploy to staging' + description: "Deploy to staging" required: false RUN_E2E_TESTS: - description: 'Run e2e tests' + description: "Run e2e tests" required: false BUILD_TOOL: - description: 'Build tool' + description: "Build tool" required: false GAR_WORKFLOW: - description: 'Use GAR auth workflow (true/false)' + description: "Use GAR auth workflow (true/false)" required: false - default: 'false' + default: "false" node-version: - description: 'Node.js version to use' + description: "Node.js version to use" required: false - default: '20' + default: "20" node-version-file: - description: 'File containing the Node.js version to use' + description: "File containing the Node.js version to use" required: false - default: '' + default: "" runs: - using: 'composite' + using: "composite" steps: - uses: actions/checkout@v4 with: @@ -58,7 +58,7 @@ runs: uses: extenda/actions/setup-gcloud@v0 with: service-account-key: ${{ inputs.SECRET_AUTH }} - export-default-credentials: 'true' + export-default-credentials: "true" - uses: extenda/actions/setup-gcloud@v0 id: gcloud @@ -127,6 +127,7 @@ runs: with: GCLOUD_AUTH_STAGING: ${{ inputs.GCLOUD_AUTH_STAGING }} BUILD_TOOL: ${{ inputs.BUILD_TOOL }} + GAR_WORKFLOW: ${{ inputs.GAR_WORKFLOW }} - uses: extenda/actions/setup-gcloud@v0 with: