-
Notifications
You must be signed in to change notification settings - Fork 0
[LSP-1272] feat: add workflows for deployment and environment management, update… #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
51f86ec
e8462f8
3aa2512
af8fbfe
ac05f6d
45778b9
4734016
391cd46
da2e578
ca39c64
a013b4e
a5bc066
259370b
22b2b75
ca261f4
f372871
bb6271e
e566e0f
5e62568
53f7b0b
b6f71ba
21c7b7d
7babbff
9b6d382
87fc777
5e1d2ea
0a8c548
a78b3c0
86f1a32
8fee6eb
45815cc
bba0ff7
56eb10b
d9c45dc
cb3edc2
81d297e
b10c0e6
738840c
beb42ee
15ccf4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Lines starting with '#' are comments. | ||
|
|
||
| # Each line is a file pattern followed by one or more owners. | ||
|
|
||
| # These owners will be the default owners for everything in the repo. | ||
|
|
||
| - @devicebits/Developers | ||
|
|
||
| # Order is important. The last matching pattern has the most precedence. | ||
|
|
||
| # So if a pull request only touches javascript files, only these owners | ||
|
|
||
| # will be requested to review. | ||
|
|
||
| # \*.js @octocat @github/js | ||
|
|
||
| # .github/\* | ||
|
|
||
| # You can also use email addresses if you prefer. | ||
|
|
||
| # docs/\* docs@example.com | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ## Background | ||
|
|
||
| Description of what you were asked to do. Try to be as detailed as possible. | ||
| The idea is to give enough background to the reviewer to perform the code review. | ||
|
|
||
| ## Changes done | ||
|
|
||
| High level description of what changes you introduced in this PR. Don't bother going into details as they can be seen in the code. Describe _what_ was done, not how or where. | ||
|
|
||
| ## Pending to be done | ||
|
|
||
| What things you left out and why. Maybe you left testing out because the PR was too big already? Maybe you will be following up with a second part with validations? Let your reviewers know! | ||
|
|
||
| ## Notes | ||
|
|
||
| Any design decisions not obvious in the code. Did you have to go outside of our standard? If so, why? | ||
|
|
||
| ## Demo | ||
|
|
||
| Screenshot/video to better understand the idea. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Release Prestage | ||
| description: | | ||
| This workflow is triggered on pull requests and deploys the application to the prestage environment. | ||
| It uses AWS credentials configured via OIDC and caches npm dependencies for faster builds. | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| run-name: "[Automated] @${{ github.actor }} ran ${{ github.workflow }} on ${{ github.ref }}" | ||
| on: [pull_request] | ||
|
|
||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| jobs: | ||
| deploy-branch: | ||
| name: Deploy branch | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - name: Setup AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| role-to-assume: "${{ secrets.OIDC_AWS_ROLE_SLS_DEPLOYMENT_PROD }}" | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| aws-region: ${{ vars.AWS_DEFAULT_REGION || 'us-east-1' }} | ||
| role-session-name: "GITHUB-${{github.run_id}}" | ||
|
|
||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| node-version: 18 | ||
| registry-url: "https://npm.pkg.github.com" | ||
| scope: "@devicebits" | ||
| always-auth: true | ||
|
|
||
| - name: Cache multiple paths | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| uses: actions/cache@v3 | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| with: | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| path: | | ||
| ~/.npm | ||
| **/node_modules | ||
| key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
|
||
| - name: Install Dependencies | ||
| run: npm ci | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: deploy branch | ||
| run: | | ||
| echo -e "$STAGENAME:\n <<: *DEFAULT" >> serverless.env.yml | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| cat serverless.env.yml | ||
| npx sls deploy --stage $STAGENAME | ||
| env: | ||
| STAGENAME: qa-${{ github.event.pull_request.head.ref }} | ||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||||||
| name: Release Production | ||||||||||
| run-name: "[Automated] @${{ github.actor }} ran ${{ github.workflow }} on ${{ github.ref }}" | ||||||||||
| description: | | ||||||||||
| This workflow is triggered on version tag pushes and deploys the application to the production environment. | ||||||||||
| It uses AWS credentials configured via OIDC and caches npm dependencies for faster builds. | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| on: | ||||||||||
| push: | ||||||||||
| tags: | ||||||||||
| - "v[0-9]+.[0-9]+.[0-9]+" | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| deploy: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| id-token: write | ||||||||||
| contents: read | ||||||||||
| steps: | ||||||||||
| - name: Setup AWS Credentials | ||||||||||
| uses: aws-actions/configure-aws-credentials@v4 | ||||||||||
| with: | ||||||||||
| role-to-assume: "${{ secrets.OIDC_AWS_ROLE_SLS_DEPLOYMENT_PROD }}" | ||||||||||
| aws-region: ${{ vars.AWS_DEFAULT_REGION || 'us-east-1' }} | ||||||||||
| role-session-name: "GITHUB-${{github.run_id}}" | ||||||||||
|
|
||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - uses: actions/setup-node@v4 | ||||||||||
| with: | ||||||||||
| node-version: 18 | ||||||||||
| registry-url: "https://npm.pkg.github.com" | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| scope: "@devicebits" | ||||||||||
| always-auth: true | ||||||||||
|
|
||||||||||
| - name: Cache npm cache | ||||||||||
|
||||||||||
| - name: Cache npm cache | |
| - name: Cache npm |
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup-node action is configured with registry-url "https://npm.pkg.github.com" and always-auth: true, but there's no NODE_AUTH_TOKEN environment variable set for authentication. If any of your dependencies are from GitHub Packages, npm ci will fail. Add the NODE_AUTH_TOKEN environment variable to the "Install dependencies" step, e.g., env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
| - name: Install dependencies | |
| - name: Install dependencies | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||||||
| name: Release Staging | ||||||||||
| description: | | ||||||||||
| This workflow is triggered on pushes to the main branch and deploys the application to the staging environment. | ||||||||||
| It uses AWS credentials configured via OIDC and caches npm dependencies for faster builds. | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| run-name: "[Automated] @${{ github.actor }} ran ${{ github.workflow }} on ${{ github.ref }}" | ||||||||||
| on: | ||||||||||
| push: | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| branches: | ||||||||||
| - main | ||||||||||
| workflow_dispatch: | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| deploy: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| id-token: write | ||||||||||
| contents: read | ||||||||||
| steps: | ||||||||||
| - name: Setup AWS Credentials | ||||||||||
| uses: aws-actions/configure-aws-credentials@v4 | ||||||||||
| with: | ||||||||||
| role-to-assume: "${{ secrets.OIDC_AWS_ROLE_SLS_DEPLOYMENT_PROD }}" | ||||||||||
| aws-region: ${{ vars.AWS_DEFAULT_REGION || 'us-east-1' }} | ||||||||||
| role-session-name: "GITHUB-${{github.run_id}}" | ||||||||||
|
|
||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - uses: actions/setup-node@v4 | ||||||||||
| with: | ||||||||||
| node-version: 18 | ||||||||||
| registry-url: "https://npm.pkg.github.com" | ||||||||||
| scope: "@devicebits" | ||||||||||
| always-auth: true | ||||||||||
|
|
||||||||||
| - name: Cache npm cache | ||||||||||
| uses: actions/cache@v4 | ||||||||||
| with: | ||||||||||
| path: | | ||||||||||
| ~/.npm | ||||||||||
| key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||||||||||
|
|
||||||||||
| - name: Install dependencies | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| - name: Install dependencies | |
| - name: Install dependencies | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||||||
| name: Remove Prestage | ||||||||||
| run-name: "[Automated] @${{ github.actor }} ran ${{ github.workflow }} on ${{ github.ref }}" | ||||||||||
| on: | ||||||||||
| pull_request: | ||||||||||
| types: [closed] | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| rm-branch-deploy: | ||||||||||
| name: Remove branch deployment | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| id-token: write | ||||||||||
| contents: read | ||||||||||
| steps: | ||||||||||
| - name: Setup AWS Credentials | ||||||||||
| uses: aws-actions/configure-aws-credentials@v4 | ||||||||||
| with: | ||||||||||
| role-to-assume: "${{ secrets.OIDC_AWS_ROLE_SLS_DEPLOYMENT_PROD }}" | ||||||||||
| aws-region: ${{ vars.AWS_DEFAULT_REGION || 'us-east-1' }} | ||||||||||
| role-session-name: "GITHUB-${{github.run_id}}" | ||||||||||
|
|
||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - uses: actions/setup-node@v4 | ||||||||||
| with: | ||||||||||
| node-version: 18 | ||||||||||
| registry-url: "https://npm.pkg.github.com" | ||||||||||
| scope: "@devicebits" | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| always-auth: true | ||||||||||
|
|
||||||||||
| - name: Cache multiple paths | ||||||||||
| uses: actions/cache@v4 | ||||||||||
| with: | ||||||||||
| path: | | ||||||||||
| ~/.npm | ||||||||||
| **/node_modules | ||||||||||
| key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||||||||||
|
|
||||||||||
| - name: Install dependencies | ||||||||||
| run: npm ci | ||||||||||
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| run: npm ci | |
| run: npm ci | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
michael-puzon-resultscx marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| node_modules | ||
| .serverless | ||
| mysql/ | ||
| logs/ |
Uh oh!
There was an error while loading. Please reload this page.