-
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.
- Loading branch information
1 parent
30faa4d
commit f6e5c9b
Showing
6 changed files
with
103 additions
and
23 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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
node_modules | ||
build | ||
dist | ||
.turbo | ||
.vite | ||
README.md | ||
.github | ||
.idea | ||
.editorconfig | ||
.gitignore | ||
CONTRIBUTING.md | ||
sonar-project.properties |
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,33 @@ | ||
name: Pull Requests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
automated_review: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Audit dependencies | ||
run: pnpm audit | ||
|
||
- name: Linting code | ||
run: pnpm run --if-present lint | ||
|
||
- name: Check code formatting | ||
run: pnpm run --if-present format |
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,47 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
drafter: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
package: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
flavor: ${{ inputs.docker-metadata-flavor }} | ||
- id: extract-env | ||
run: | | ||
if [[ "$GITHUB_REF_TYPE" == tag ]] | ||
then | ||
echo "environment=production" >> $GITHUB_OUTPUT | ||
else | ||
echo "environment=qa" >> $GITHUB_OUTPUT | ||
fi | ||
- uses: docker/build-push-action@v3 | ||
with: | ||
build-args: | | ||
BUILD_MODE=${{ steps.extract-env.outputs.environment }} | ||
context: . | ||
file: Dockerfile.app | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,14 @@ | ||
ARG BUILD_MODE=production | ||
|
||
FROM node:16 as build-web | ||
WORKDIR /build | ||
COPY . . | ||
RUN npm install -g pnpm && \ | ||
pnpm install --frozen-lockfile && \ | ||
BUILD_MODE=${BUILD_MODE} pnpm build | ||
|
||
FROM nginx:stable-alpine | ||
COPY --from=build-web /build/apps/polyflix/dist /usr/share/nginx/html | ||
COPY .docker/nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 8080 | ||
CMD [ "nginx", "-g", "daemon off;" ] |