-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update checkout action and replace pat token
- Loading branch information
Showing
6 changed files
with
47 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout ${{ github.ref }} branch | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
|
@@ -29,7 +29,7 @@ jobs: | |
run: pnpm lint | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
run: pnpm test -- --changed ${{ github.ref }} | ||
|
||
deploy-to-dev: | ||
name: Deploy React App to Dev | ||
|
@@ -55,9 +55,10 @@ jobs: | |
tag: ${{ steps.changelog.outputs.tag }} | ||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
token: ${{ secrets.PAT }} | ||
|
||
- id: changelog | ||
name: Conventional Changelog | ||
|
@@ -66,14 +67,14 @@ jobs: | |
git-message: 'chore(release): {version} [no ci]' | ||
git-user-email: [email protected] | ||
git-user-name: Emmanuel Nipal | ||
github-token: ${{ secrets.PAT }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
output-file: 'false' | ||
|
||
- name: Create Github Release | ||
uses: actions/create-release@v1 | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.changelog.outputs.tag }} | ||
release_name: ${{ steps.changelog.outputs.tag }} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: 'Manual deploy' | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to deploy' | ||
required: true | ||
type: choice | ||
default: 'dev' | ||
options: | ||
- dev | ||
- staging | ||
|
||
jobs: | ||
manual-deploy-dev: | ||
name: 'Deploy to Dev' | ||
if: ${{ github.event.inputs.environment == 'dev' }} | ||
uses: ./.github/workflows/deploy-app-workflow.yml | ||
with: | ||
environment: DEV | ||
branch: ${{ github.ref }} | ||
secrets: | ||
app_env: ${{ secrets.DEV_APP_ENV }} | ||
ssh_private_key: ${{ secrets.DEV_SSH_PRIVATE_KEY }} | ||
ssh_host: ${{ secrets.DEV_SSH_HOST }} | ||
ssh_user: ${{ secrets.SSH_USER }} | ||
|
||
manual-deploy-staging: | ||
name: 'Deploy to Staging' | ||
if: ${{ github.event.inputs.environment == 'staging' }} | ||
uses: ./.github/workflows/deploy-app-workflow.yml | ||
with: | ||
environment: STAGING | ||
branch: ${{ github.ref }} | ||
secrets: | ||
app_env: ${{ secrets.STAGING_APP_ENV }} | ||
ssh_private_key: ${{ secrets.STAGING_SSH_PRIVATE_KEY }} | ||
ssh_host: ${{ secrets.STAGING_SSH_HOST }} | ||
ssh_user: ${{ secrets.SSH_USER }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters