-
Notifications
You must be signed in to change notification settings - Fork 21
44 lines (36 loc) · 1.23 KB
/
docker-image.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
name: Docker Image
on:
release:
types: [ published ]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest ]
arch: [ amd64, arm64 ]
runs-on: ${{ matrix.os }}
steps:
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: lamer1
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Set up QEMU (for ARM64 emulation)
if: matrix.arch == 'arm64'
run: |
sudo apt-get install -y qemu-user-static
- name: Set up Docker Buildx (for multi-platform builds)
uses: docker/setup-buildx-action@v1
- name: Build and push Docker image
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t supertypo/kaspa-rest-server:${{github.ref_name}} \
-t supertypo/kaspa-rest-server:latest \
--build-arg version=${{github.ref_name}} \
--push .
docker buildx imagetools inspect supertypo/kaspa-rest-server:latest