-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (38 loc) · 1.23 KB
/
docker-test.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
---
name: Task - Build Docker Image
on:
workflow_dispatch:
workflow_call:
jobs:
build_containers:
strategy:
matrix:
package: [pragma-sdk, price-pusher, vrf-listener, checkpointer]
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Extract package version
if: matrix.package == 'pragma-sdk'
run: |
PKG_PATH=$(echo ${{ matrix.package }} | tr '-' '_')
export PACKAGE_VERSION=$(grep -o '".*"' ./${{ matrix.package }}/$PKG_PATH/__init__.py | tr -d '"')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo $PACKAGE_VERSION
- name: Build Docker Image
id: docker_build
uses: docker/[email protected]
with:
context: .
file: ./${{ matrix.package }}/Dockerfile
build-args: ${{ matrix.package == 'pragma-sdk' && format('PRAGMA_PACKAGE_VERSION={0}', env.PACKAGE_VERSION) || '' }}