feat: openid client v6 with more other improvements #165
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
# paths: | |
# - "src/**" | |
jobs: | |
build: | |
defaults: | |
run: | |
working-directory: ./src | |
env: | |
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_BASE_URL }} | |
NEXTAUTH_CLIENT_ID : ${{ secrets.NEXTAUTH_CLIENT_ID }} | |
NEXT_PUBLIC_APP_URL : ${{ secrets.NEXT_PUBLIC_APP_URL }} | |
NEXT_PUBLIC_SCOPE: ${{ secrets.NEXT_PUBLIC_SCOPE }} | |
NEXT_PUBLIC_UMAMI_SCRIPT_URL: ${{ secrets.NEXT_PUBLIC_UMAMI_SCRIPT_URL }} | |
NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${{ secrets.NEXT_PUBLIC_UMAMI_WEBSITE_ID }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: git config | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm run build | |
- name: Bump version and release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx release-it | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
registry: registry.antosubash.com | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build the abpreact nextjs image | |
run: docker build . --file ./Dockerfile --tag abpreactnextjs:dev | |
- name: Docker tag next image | |
run: docker tag abpreactnextjs:dev registry.antosubash.com/abpreactnextjs:dev | |
- name: Push abpreact-nextjs image | |
run: docker push registry.antosubash.com/abpreactnextjs:dev | |
- name: Send Http Post Request to Deploy NextJs App | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: ${{ secrets.NEXTJS_WEBHOOK_URL }} | |
method: 'POST' |