-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.35 KB
/
build.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
name: build
on:
pull_request:
branches:
- "*"
push:
branches:
- main
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
packages: write
statuses: write
steps:
- uses: actions/checkout@v4.0.0
with:
fetch-depth: 0
- name: createVersion
run: |
echo "GIT_VERSION=$(git describe --tag --always)" >> $GITHUB_ENV
echo "VERSION=$(git describe --tag --always | sed s/^v//)" >> $GITHUB_ENV
echo "IMG=ghcr.io/${{ github.repository }}:${{ env.VERSION }}" >> $GITHUB_ENV
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push
run: |
make docker-buildx VERSION=${{ env.VERSION }} IMG=${{ env.IMG }}
- name: bundle
run: |
make bundle bundle-build bundle-push VERSION=${{ env.VERSION }} IMG=${{ env.IMG }}
- name: catalog
run: |
make catalog-build catalog-push VERSION=${{ env.VERSION }} IMG=${{ env.IMG }}