Feat/templates (#84) #49
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
name: CD | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
# Cache node_modules | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- uses: nrwl/nx-set-shas@v4 | |
- name: Run license check | |
run: npx license-checker --onlyAllow "MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# build the docker image for keycloak | |
- name: Build Keycloak Docker Image | |
run: cd deploys/keycloak && docker-compose build keycloak && docker-compose push keycloak | |
# add the release, build the container and release it with the information for sentry | |
- name: Build and push images | |
run: pnpm exec nx affected -t sentry-release container sentry-deploy | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
INPUT_PUSH: true | |
# Upload the extension | |
- name: Upload Chrome extension | |
if: ${{ hashFiles('dist/apps/holder-browser-extension') != ''}} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chrome-extension | |
path: dist/apps/holder-browser-extension |