forked from StarRocks/starrocks
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (54 loc) · 2.84 KB
/
release-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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'release docker images'
# Don't trigger actions automatically
#on:
# release:
# types: [published]
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
env:
RELEASE_VERSION: ${{ github.ref_name }}
REGISTRY: ghcr.io/${{ github.repository }}
jobs:
release-docker-images:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build artifact docker image
run: |
DOCKER_BUILDKIT=1 docker build --rm=true --build-arg RELEASE_VERSION=${RELEASE_VERSION} -f docker/dockerfiles/artifacts/artifact.Dockerfile -t artifact-ubuntu:${RELEASE_VERSION} .
- name: build and publish fe docker image
run: |
DOCKER_BUILDKIT=1 docker build --build-arg ARTIFACTIMAGE=artifact-ubuntu:${RELEASE_VERSION} -f docker/dockerfiles/fe/fe-ubuntu.Dockerfile -t ${REGISTRY}/fe-ubuntu:${RELEASE_VERSION} .
# Pushing to the GitHub packages docker registry regularly fails with "unknown blob" errors. The "fix" suggested by GitHub is looping.
until docker push ${REGISTRY}/fe-ubuntu:${RELEASE_VERSION}
do
echo "Could not push ${REGISTRY}/fe-ubuntu:${RELEASE_VERSION} trying again."
done
- name: build and publish be docker image
run: |
DOCKER_BUILDKIT=1 docker build --build-arg ARTIFACTIMAGE=artifact-ubuntu:${RELEASE_VERSION} -f docker/dockerfiles/be/be-ubuntu.Dockerfile -t ${REGISTRY}/be-ubuntu:${RELEASE_VERSION} .
# Pushing to the GitHub packages docker registry regularly fails with "unknown blob" errors. The "fix" suggested by GitHub is looping.
until docker push ${REGISTRY}/be-ubuntu:${RELEASE_VERSION}
do
echo "Could not push ${REGISTRY}/be-ubuntu:${RELEASE_VERSION} trying again."
done
- name: build and publish allin1 docker image
run: |
DOCKER_BUILDKIT=1 docker build --build-arg ARTIFACTIMAGE=artifact-ubuntu:${RELEASE_VERSION} -f docker/dockerfiles/allin1/allin1-ubuntu.Dockerfile -t ${REGISTRY}/allin1-ubuntu:${RELEASE_VERSION} docker/dockerfiles/allin1
# Pushing to the GitHub packages docker registry regularly fails with "unknown blob" errors. The "fix" suggested by GitHub is looping.
until docker push ${REGISTRY}/allin1-ubuntu:${RELEASE_VERSION}
do
echo "Could not push ${REGISTRY}/allin1-ubuntu:${RELEASE_VERSION} trying again."
done