-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (65 loc) · 2.27 KB
/
CI.yaml
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
67
68
69
70
71
72
73
74
75
76
name: CI
on: [push]
env:
NODE_VERSION: 18
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Code Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Code Linting
run: npm run lint
build:
name: Build
if: github.ref == 'refs/heads/main' && success()
needs: linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: scrumlr.io - Landing Page - Build
id: meta-landing-page
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/inovex/scrumlr.io-landing-page/image
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
type=sha,prefix=sha-,format=short
labels: |
org.opencontainers.image.url=https://github.com/inovex/scrumlr.io/pkgs/container/scrumlr.io-landing-page%2Fimage
org.opencontainers.image.source=https://github.com/inovex/scrumlr.io-landing-page
org.opencontainers.image.vendor=inovex
org.opencontainers.image.licenses=MIT
org.opencontainers.image.title=scrumlr.io - Landing Page
org.opencontainers.image.description=The landing page of scrumlr.io
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2
- name: Push landing page image
id: push-landing-page
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ steps.meta-landing-page.outputs.tags }}
labels: ${{ steps.meta-landing-page.outputs.labels }}
build-args: |
DIRECTUS_URL=${{ secrets.DIRECTUS_URL }}
DIRECTUS_TOKEN=${{ secrets.DIRECTUS_TOKEN }}