File tree 2 files changed +65
-1
lines changed
2 files changed +65
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - " main"
7
+ paths :
8
+ - " .github/workflows/release.yaml"
9
+
10
+ workflow_dispatch :
11
+ inputs :
12
+ branch :
13
+ description : ' Branch to run the workflow on'
14
+ required : true
15
+ default : ' main'
16
+
17
+ jobs :
18
+ build-and-release :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Checkout
22
+ uses : actions/checkout@v4
23
+ with :
24
+ ref : ${{ github.event.inputs.branch }}
25
+
26
+ - name : Setup Go
27
+ uses : actions/setup-go@v4
28
+ with :
29
+ go-version : 1.22.1
30
+
31
+ - name : Build
32
+ run : make build
33
+
34
+ - name : Set up QEMU
35
+ uses : docker/setup-qemu-action@v3
36
+
37
+ - name : Set up Docker Buildx
38
+ uses : docker/setup-buildx-action@v3
39
+
40
+ - name : Login to GHCR
41
+ uses : docker/login-action@v2
42
+ with :
43
+ registry : ghcr.io
44
+ username : ${{ github.actor }}
45
+ password : ${{ secrets.GITHUB_TOKEN }}
46
+
47
+ - name : Build and push
48
+ id : push
49
+ uses : docker/build-push-action@v5
50
+ with :
51
+ context : extauthz
52
+ platforms : linux/amd64,linux/arm64
53
+ push : ${{ github.event_name != 'pull_request' }}
54
+ tags : openfga/openfga-envoy:${{ github.event.inputs.branch || 'dev' }}
55
+
56
+ - name : Write summary
57
+ if : ${{ github.event_name != 'pull_request' }}
58
+ run : |
59
+ echo "The image is available:" >> $GITHUB_STEP_SUMMARY
60
+ echo "```" >> $GITHUB_STEP_SUMMARY
61
+ echo "docker pull ghcr.io/openfga/openfga-envoy:${{ github.event.inputs.branch }}@${{ steps.push.outputs.digest }}" >> $GITHUB_STEP_SUMMARY
62
+ echo "```" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change
1
+ OPENFGA_EXTAUTHZ_VERSION ?= dev
2
+
1
3
.PHONY : test
2
4
test :
3
5
@go test -count=1 ./...
9
11
10
12
.PHONY : docker
11
13
docker : build
12
- @docker build -t envoy -extauthz -f Dockerfile .
14
+ @docker build -t gcr.io/openfga/openfga -extauthz: $( OPENFGA_EXTAUTHZ_VERSION ) -f Dockerfile .
13
15
14
16
.PHONY : e2e
15
17
e2e :
You can’t perform that action at this time.
0 commit comments