forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.28 KB
/
docker-test.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
---
name: Task - Build Docker Image
on:
workflow_dispatch:
workflow_call:
jobs:
build_containers:
strategy:
matrix:
package: [docker/sui-node]
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: Create Docker Args
id: Docker_args
shell: bash
run: |
# Set the necessary environment variables for the Docker build
GIT_REVISION="$(git describe --always --abbrev=12 --dirty --exclude '*')"
BUILD_DATE="$(date -u +'%Y-%m-%d')"
echo "GIT_REVISION=$GIT_REVISION" >> $GITHUB_ENV
echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
- name: Build and push Sui Node
uses: docker/[email protected]
with:
context: .
file: ./${{ matrix.package }}/Dockerfile
push: false
build-args: |
GIT_REVISION=${{ steps.Docker_args.outputs.GIT_REVISION }}
BUILD_DATE=${{ steps.Docker_args.outputs.BUILD_DATE }}