Make github auth optional and better name the env vars #27
Workflow file for this run
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: 🚀 Publish Trigger.dev Docker | |
on: | |
push: | |
branches: | |
- main | |
- dev-q22023 | |
permissions: | |
id-token: write | |
packages: write | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
typecheck: | |
name: ʦ TypeScript | |
runs-on: buildjet-4vcpu-ubuntu-2204 | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
- name: ⎔ Setup pnpm | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 7.18 | |
- name: ⎔ Setup node | |
uses: buildjet/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
- name: 📥 Download deps | |
run: pnpm install --frozen-lockfile | |
- name: 📀 Generate Prisma Client | |
run: pnpm run generate | |
- name: 🔎 Type check | |
run: pnpm run typecheck --filter webapp | |
publish: | |
needs: [typecheck] | |
runs-on: buildjet-4vcpu-ubuntu-2204 | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./docker/Dockerfile | |
push: true | |
tags: ghcr.io/${{ github.repository }}:latest | |
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:latest | |
cache-to: type=inline |