- name: Cache node modules uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node-
- name: Cache node modules uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node-
- name: Cache node modules uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node-
jobs: build-and-push: runs-on: ubuntu-latest permissions: contents: read packages: write # ← this line is required, not optional
jobs: build-and-push: runs-on: ubuntu-latest permissions: contents: read packages: write # ← this line is required, not optional
jobs: build-and-push: runs-on: ubuntu-latest permissions: contents: read packages: write # ← this line is required, not optional
- name: Log in to GHCR uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to GHCR uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to GHCR uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}
deploy-production: runs-on: ubuntu-latest needs: [lint-and-test, build-and-push] if: github.ref == 'refs/heads/main' && github.event_name == 'push' environment: production
deploy-production: runs-on: ubuntu-latest needs: [lint-and-test, build-and-push] if: github.ref == 'refs/heads/main' && github.event_name == 'push' environment: production
deploy-production: runs-on: ubuntu-latest needs: [lint-and-test, build-and-push] if: github.ref == 'refs/heads/main' && github.event_name == 'push' environment: production
env: APP_ENV: ${{ vars.APP_ENV }} LOG_LEVEL: ${{ vars.LOG_LEVEL }} DATABASE_URL: ${{ secrets.DATABASE_URL }} # this one actually needs to be a secret
env: APP_ENV: ${{ vars.APP_ENV }} LOG_LEVEL: ${{ vars.LOG_LEVEL }} DATABASE_URL: ${{ secrets.DATABASE_URL }} # this one actually needs to be a secret
env: APP_ENV: ${{ vars.APP_ENV }} LOG_LEVEL: ${{ vars.LOG_LEVEL }} DATABASE_URL: ${{ secrets.DATABASE_URL }} # this one actually needs to be a secret
runs-on: ubuntu-22.04 # pinned, not latest
runs-on: ubuntu-22.04 # pinned, not latest
runs-on: ubuntu-22.04 # pinned, not latest