-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
155 additions
and
141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-api-release: | ||
runs-on: ubuntu-latest | ||
name: Build and push API docker image for release | ||
if: ${{ startsWith(github.ref , 'refs/tags/')}} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Docker image | ||
run: docker build -t keyshade/keyshade-api:${{ github.ref_name }} keyshade/keyshade-api:latest -f ./apps/api/Dockerfile . | ||
|
||
- name: Push Docker image | ||
run: docker push keyshade/keyshade-api |
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,28 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-web-release: | ||
runs-on: ubuntu-latest | ||
name: Build and push Web docker image for release | ||
if: ${{ startsWith(github.ref , 'refs/tags/') }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Docker image | ||
run: docker build -t keyshade/keyshade-web:${{ github.ref_name }} keyshade/keyshade-web:latest -f ./apps/web/Dockerfile . | ||
|
||
- name: Push Docker image | ||
run: docker push keyshade/keyshade-web |
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,20 @@ | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: ['apps/api/**', '.github/workflows/api.yaml'] | ||
|
||
jobs: | ||
deploy-api-stage: | ||
runs-on: ubuntu-latest | ||
name: Deploy to stage | ||
if: github.ref == 'refs/heads/develop' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install fly CLI | ||
run: | | ||
curl -L https://fly.io/install.sh | sh | ||
- name: Deploy to stage | ||
run: ~/.fly/bin/fly deploy --config fly.api.toml --dockerfile ./apps/api/Dockerfile --app keyshade-api-stage --access-token ${{ secrets.FLY_ACCESS_TOKEN }} |
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,20 @@ | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: ['apps/web/**', '.github/workflows/web.yaml'] | ||
|
||
jobs: | ||
deploy-stage: | ||
runs-on: ubuntu-latest | ||
name: Deploy to stage | ||
if: github.ref == 'refs/heads/develop' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install fly CLI | ||
run: | | ||
curl -L https://fly.io/install.sh | sh | ||
- name: Deploy to stage | ||
run: ~/.fly/bin/fly deploy --config fly.web.toml --dockerfile ./apps/web/Dockerfile --app keyshade-web --access-token ${{ secrets.FLY_ACCESS_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
on: | ||
push: | ||
paths: ['apps/web/**', '.github/workflows/web.yaml'] | ||
pull_request: | ||
paths: ['apps/web/**', '.github/workflows/web.yaml'] | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
name: Validate Web | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install packages | ||
run: | | ||
pnpm i | ||
- name: Lint | ||
run: | | ||
pnpm run lint:web | ||
- name: Test | ||
run: | | ||
pnpm run test:web | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
flags: web |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm run lint:fix && pnpm run prettier:fix && pnpm run test:api && pnpm run e2e:api | ||
pnpm run lint:fix && pnpm run prettier:fix |