v1.23.6 #16
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 to public registry | |
on: | |
release: | |
types: [released] | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: ghcr.io | |
GH_TOKEN: ${{ github.token }} | |
permissions: | |
contents: write | |
id-token: write | |
pull-requests: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Check licenses | |
run: pnpm license-check | |
- name: GraphQL Codegen | |
run: pnpm graphql-codegen | |
- name: Typecheck | |
run: pnpm typecheck | |
- name: Lint | |
run: pnpm lint | |
- name: Run tests | |
run: pnpm test | |
- name: Compile project | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: pnpm build | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Dockerize & Push to Registry | |
if: ${{ github.repository == 'swan-io/swan-partner-frontend' }} | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/swan-io/swan-partner-frontend:latest | |
${{ env.REGISTRY }}/swan-io/swan-partner-frontend:${{ github.ref_name }} |