Merge pull request #177 from code0-tech/renovate/payloadcms-monorepo #1199
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build Image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| env: | |
| PAYLOAD_SECRET: build-secret | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/payload | |
| NEXT_PUBLIC_APP_URL: https://code0.tech | |
| NEXT_PUBLIC_GA_MEASUREMENT_ID: G-55EJVGDCLZ | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.14.1' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm ci | |
| - run: docker compose up -d --wait | |
| - run: npm run migrate | |
| - run: npm run import-data | |
| - run: npm run build | |
| - run: >- | |
| docker build | |
| -t ghcr.io/code0-tech/cygnus:${{ github.run_number }} | |
| -f Dockerfile | |
| . | |
| - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin ghcr.io | |
| name: Login to registry | |
| if: ${{ github.event_name == 'push' }} | |
| - run: docker push ghcr.io/code0-tech/cygnus:${{ github.run_number }} | |
| if: ${{ github.event_name == 'push' }} |