-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.37 KB
/
main.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
name: 'ci'
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
types: [opened, reopened, synchronize]
permissions:
id-token: write # Important for at least docker gha cache
contents: read
jobs:
dagger:
runs-on: ubuntu-latest
services:
argocd-redis:
image: redis
ports:
- "6379:6379"
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Setup go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
-
name: Install
run: go get dagger.io/dagger@latest
-
name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v2
-
name: Release and deploy with Dagger
run: |
export _EXPERIMENTAL_DAGGER_CACHE_CONFIG="type=gha,mode=max,url=$ACTIONS_CACHE_URL,token=$ACTIONS_RUNTIME_TOKEN"
go run ci/main.go
env:
REGISTRY_PASSWORD: '${{ secrets.REGISTRY_PASSWORD }}'
REGISTRY_USER: '${{ secrets.REGISTRY_USER }}'
GITHUB_ACCESS_TOKEN: '${{ secrets.GH_ACCESS_TOKEN }}'
REGISTRY_URL: '${{ secrets.REGISTRY_URL }}'