-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (81 loc) · 2.42 KB
/
ci.yml
File metadata and controls
85 lines (81 loc) · 2.42 KB
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
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 1.25
- name: Test
run: |
make tests
- name: Coveralls
uses: coverallsapp/github-action@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_SERVICE_NAME: gihub-action
with:
file: covprofile
format: golang
continue-on-error: true
test-generate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: 1.25
- name: Build gateway
run: |
make build
- name: Test code generation
run: |
make clean
make cleanup-generate
make internal/login/spec.gen.go
make build
publish-images:
runs-on: ubuntu-latest
needs:
- test
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: set up environment variables
run: |
echo "GIT_USER=Renku Bot" >> $GITHUB_ENV
echo "GIT_EMAIL=renku@datascience.ch" >> $GITHUB_ENV
- name: Push chart and images
uses: SwissDataScienceCenter/renku-actions/publish-chartpress-images@v1.23.1
env:
PLATFORMS: "linux/amd64,linux/arm64"
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
- name: Get image tag
id: image-tag
run: |
echo "image=renku/renku-gateway:$(echo ${GITHUB_REF} | cut -d/ -f3)" >> $GITHUB_OUTPUT
- name: Scan amalthea-sessions image
uses: snyk/actions/docker@master
continue-on-error: true
with:
image: ${{ steps.image-tag.outputs.image}}
args: --file=./Dockerfile --severity-threshold=high --sarif-file-output=gw.sarif
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload Snyk report
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: gw.sarif
category: snyk_amalthea-sessions