-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.41 KB
/
main.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
name: Check golangci lint and publish docker images on main branch
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
pull-requests: read
packages: write
jobs:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: touch internal/embedded/migra/migra
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
build-and-push-images:
needs: golangci
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build migra
run: ./internal/embedded/migra/build-migra.sh
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push trek Docker image
uses: docker/build-push-action@v2
with:
context: .
pull: true
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/printeers/trek:nightly
- name: Build and push trek Docker image
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile.pgmodeler
pull: true
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/printeers/trek:nightly-pgmodeler