15
15
id : branch_name
16
16
run : |
17
17
GIT_BRANCH=`git symbolic-ref --short HEAD | sed "s/[^[:alnum:].]//g"`
18
- echo "::set-output name= GIT_BRANCH:: ${GIT_BRANCH}"
18
+ echo "GIT_BRANCH= ${GIT_BRANCH}" >> $GITHUB_OUTPUT
19
19
- name : Get semantic version
20
20
21
21
id : versioning
@@ -28,11 +28,11 @@ jobs:
28
28
outputs :
29
29
version : ${{ github.ref == 'refs/heads/master' && steps.versioning.outputs.version_tag || steps.versioning.outputs.version}}
30
30
buildx :
31
- runs-on : ubuntu-latest
31
+ runs-on : ubuntu-22.04
32
32
needs : [ set_version ]
33
33
steps :
34
34
- name : Checkout
35
- uses : actions/checkout@v2
35
+ uses : actions/checkout@v4
36
36
with :
37
37
fetch-depth : 0
38
38
- name : Set up QEMU
@@ -56,26 +56,18 @@ jobs:
56
56
then
57
57
DOCKER_PLATFORMS=linux/amd64,linux/arm64
58
58
else
59
- DOCKER_PLATFORMS=linux/amd64
59
+ DOCKER_PLATFORMS=linux/amd64,linux/arm64
60
60
fi
61
61
VERSION=${{ needs.set_version.outputs.version }}
62
62
63
63
TAGS="-t ${DOCKER_IMAGE}:${VERSION} -t ${DOCKER_IMAGE}:latest"
64
64
65
- echo ::set-output name=docker_image::${DOCKER_IMAGE}
66
- echo ::set-output name=version::${VERSION}
67
- echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
68
- ${TAGS} --file ton-http-api/.docker/Dockerfile ton-http-api
69
-
70
- echo "Pulling latest image for cache"
71
- IFS=', ' read -r -a PLATFORMS <<< "${DOCKER_PLATFORMS}"
72
- for platform in "${PLATFORMS[@]}"
73
- do
74
- echo "Pulling image for platform ${platform}"
75
- docker pull --platform ${platform} ${{ steps.prepare.outputs.docker_image }}:latest || true
76
- done
65
+ echo "docker_image=${DOCKER_IMAGE}" >> $GITHUB_OUTPUT
66
+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
67
+ echo "buildx_args=--platform ${DOCKER_PLATFORMS} --no-cache ${TAGS} --file ton-http-api/.docker/Dockerfile ton-http-api" >> $GITHUB_OUTPUT
77
68
- name : Docker Buildx (build)
78
69
run : |
70
+ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes
79
71
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
80
72
- name : Login to DockerHub
81
73
if : success() && github.repository == 'toncenter/ton-http-api' && github.event_name == 'push' && github.ref == 'refs/heads/master'
0 commit comments