-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (96 loc) · 3.14 KB
/
cli.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
name: Build CLI images
env:
GITHUB_OUTPUT: ""
on:
workflow_dispatch:
inputs:
version:
description: 'Corresponds to git tag, e.g. "vX.Y.Z"'
required: true
jobs:
psinode-cli-builder:
name: psinode-cli-builder
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 0
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository_owner }}/psinode"
TAGS="${IMAGE}:${{ github.event.inputs.version }}"
echo "tags=${TAGS,,}" >> $GITHUB_OUTPUT
- name: Building ${{ steps.prep.outputs.tags }}
run: true
- name: Docker Buildx setup
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- name: Login in to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set TOOL_CONFIG version
id: tool_cfg_img
run: |
latest_tag=$(./.github/scripts/latest-tag.sh "gofractally/http-tool-config")
echo "TOOL_CONFIG_IMAGE=ghcr.io/gofractally/http-tool-config:${latest_tag}" >> $GITHUB_OUTPUT
- name: Build & Publish Image
uses: docker/build-push-action@v5
with:
build-args: |
RELEASE_TAG=${{ github.event.inputs.version }}
TOOL_CONFIG_IMAGE=${{ steps.tool_cfg_img.outputs.TOOL_CONFIG_IMAGE }}
context: .
push: true
no-cache: true
pull: true
file: docker/psinode.Dockerfile
tags: ${{ steps.prep.outputs.tags }}
psibase-cli-builder:
name: psibase-cli-builder
runs-on: ubuntu-latest
needs: psinode-cli-builder
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 0
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository_owner }}/psibase"
TAGS="${IMAGE}:${{ github.event.inputs.version }}"
echo "tags=${TAGS,,}" >> $GITHUB_OUTPUT
- name: Showtag
id: showtag
run: echo ${{ steps.prep.outputs.tags }}
- name: Docker Buildx setup
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
- name: Login in to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Image
uses: docker/build-push-action@v5
with:
build-args: |
psinode_version=${{ github.event.inputs.version }}
context: .
push: true
no-cache: true
pull: true
file: docker/psibase.Dockerfile
tags: ${{ steps.prep.outputs.tags }}