-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (111 loc) · 3.84 KB
/
release.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Release and Publish
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
OWNER: ${{ github.repository_owner }}
RUST_VERSION: 1.81.0
jobs:
build-and-push:
runs-on: self-hosted
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Build and push Consumer image
uses: docker/build-push-action@v5
with:
context: .
file: consumer/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/0xintuition/consumer:${{ steps.meta.outputs.version }}
${{ env.REGISTRY }}/0xintuition/consumer:latest
build-args: |
RUST_VERSION=${{ env.RUST_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push Image Guard
uses: docker/build-push-action@v5
with:
context: .
file: image-guard/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/0xintuition/image-guard:${{ steps.meta.outputs.version }}
${{ env.REGISTRY }}/0xintuition/image-guard:latest
build-args: |
RUST_VERSION=${{ env.RUST_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push Substreams Sink
uses: docker/build-push-action@v5
with:
context: .
file: substreams-sink/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/0xintuition/substreams-sink:${{ steps.meta.outputs.version }}
${{ env.REGISTRY }}/0xintuition/substreams-sink:latest
build-args: |
RUST_VERSION=${{ env.RUST_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push Hasura migrations
uses: docker/build-push-action@v5
with:
context: .
file: hasura/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/0xintuition/hasura-migrations:${{ steps.meta.outputs.version }}
${{ env.REGISTRY }}/0xintuition/hasura-migrations:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push CLI TUI image
uses: docker/build-push-action@v5
with:
context: .
file: cli/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/0xintuition/cli:${{ steps.meta.outputs.version }}
${{ env.REGISTRY }}/0xintuition/cli:latest
build-args: |
RUST_VERSION=${{ env.RUST_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Check permissions
run: |
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.meta.outputs.version }}
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}