Skip to content

Commit 2b392b6

Browse files
authored
ci: update workflows for manual dispatch (#210)
1 parent 83364f3 commit 2b392b6

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
repository_dispatch:
77
types: [production-deployment]
88

9+
# Allows to run the workflow manually from the Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
tag:
13+
description: Tag or branch to deploy
14+
required: false
15+
default: main
16+
type: string
17+
918
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
1019
jobs:
1120
deploy-app-to-prod:
@@ -16,7 +25,7 @@ jobs:
1625
- name: Checkout code
1726
uses: actions/checkout@v4
1827
with:
19-
ref: ${{ github.event.client_payload.tag }}
28+
ref: ${{ github.event.client_payload.tag || inputs.tag }}
2029

2130
- name: Yarn install and Cache dependencies
2231
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1
@@ -31,19 +40,13 @@ jobs:
3140
run: yarn build
3241
shell: bash
3342

34-
- name: Upload source maps
35-
run: yarn sentry:sourcemaps
36-
shell: bash
37-
env:
38-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
39-
4043
- name: Deploy
4144
uses: graasp/graasp-deploy/.github/actions/deploy-s3-app@v1
4245
# Replace input build-folder or version if needed
4346
with:
44-
build-folder: "build"
47+
build-folder: 'build'
4548
graasp-app-id: ${{ secrets.APP_ID }}
46-
version: "latest"
49+
version: 'latest'
4750
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
4851
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
4952
aws-region: ${{ vars.APPS_AWS_REGION_PROD }}

.github/workflows/deploy-stage.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
repository_dispatch:
77
types: [staging-deployment]
88

9+
# Allows to run the workflow manually from the Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
tag:
13+
description: Tag or branch to deploy
14+
required: false
15+
default: main
16+
type: string
17+
918
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
1019
jobs:
1120
deploy-app-to-staging:
@@ -16,7 +25,7 @@ jobs:
1625
- name: Checkout code
1726
uses: actions/checkout@v4
1827
with:
19-
ref: ${{ github.event.client_payload.tag }}
28+
ref: ${{ github.event.client_payload.tag || inputs.tag }}
2029

2130
- name: Yarn install and Cache dependencies
2231
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1
@@ -31,19 +40,13 @@ jobs:
3140
run: yarn build
3241
shell: bash
3342

34-
- name: Upload source maps
35-
run: yarn sentry:sourcemaps
36-
shell: bash
37-
env:
38-
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
39-
4043
- name: Deploy
4144
uses: graasp/graasp-deploy/.github/actions/deploy-s3-app@v1
4245
# Replace input build-folder or version if needed
4346
with:
44-
build-folder: "build"
47+
build-folder: 'build'
4548
graasp-app-id: ${{ secrets.APP_ID }}
46-
version: "latest"
49+
version: 'latest'
4750
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_STAGE }}
4851
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_STAGE }}
4952
aws-region: ${{ vars.APPS_AWS_REGION_STAGE }}

0 commit comments

Comments
 (0)