-
Notifications
You must be signed in to change notification settings - Fork 26
66 lines (54 loc) · 1.53 KB
/
publish-public-registry.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn install --pure-lockfile
- name: Check licenses
run: yarn license-check
- name: GraphQL Codegen
run: yarn graphql-codegen
- name: Typecheck
run: yarn typecheck
- name: Lint
run: yarn lint
- name: Run tests
run: yarn test
- name: Compile project
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: yarn 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 }}