-
Notifications
You must be signed in to change notification settings - Fork 12
89 lines (69 loc) · 2.15 KB
/
release.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
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
name: Build
on:
workflow_dispatch:
push:
# branches:
# - release/v0.12
# tags:
# - v0.12.*
permissions:
contents: read
id-token: 'write'
jobs:
deploy:
name: Build everything
runs-on: ubuntu-latest
permissions:
contents: write
environment:
name: release
steps:
- name: Checkout
uses: actions/checkout@v3
- run: echo ${{ secrets.DOCKER_USERNAME }}
- run: echo ${{ secrets.DOCKER_SECRET }} | sum - | sum - | md5sum
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_SECRET }}
- name: Install build dependencies
run: pip3 install jsonnet
- name: Get version
id: version
run: echo VERSION=sha-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
- name: Build packages
run: make packages
# - name: Publish release distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
- name: Create deploy bundle
run: templates/generate-all deploy.zip v${{ steps.version.outputs.VERSION }}
# - uses: ncipollo/release-action@v1
# with:
# artifacts: deploy.zip
# generateReleaseNotes: true
# makeLatest: false
# prerelease: true
# skipIfReleaseExists: true
- name: Build container
run: make container
- name: Extract metadata for container
id: meta
uses: docker/metadata-action@v4
with:
images: trustgraph/trustgraph-flow
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Containerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}