File tree Expand file tree Collapse file tree 2 files changed +66
-2
lines changed Expand file tree Collapse file tree 2 files changed +66
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Docker build
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+ push :
8+ branches :
9+ - main
10+ - beta
11+
12+ jobs :
13+ docker :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Set up tags
17+ id : setup
18+ run : |
19+ TAG_BASE="quay.io/ibmgaragecloud/toolkit-guide"
20+
21+ BRANCH=${GITHUB_REF#refs/heads/}
22+ TAG="${{ github.event.release.tag_name }}"
23+ if [[ -n "${TAG}" ]]; then
24+ echo "Running against tag: ${TAG}"
25+ TAGS="${TAG_BASE}:${TAG}"
26+ else
27+ echo "Running against branch: ${BRANCH}"
28+ TAGS="${TAG_BASE}:${BRANCH}"
29+ if [[ "${BRANCH}" == "main" ]]; then
30+ TAGS="${TAGS},${TAG_BASE}:latest"
31+ fi
32+ fi
33+
34+ echo "::set-output name=tags::${TAGS}"
35+
36+ - name : Set up QEMU
37+ uses : docker/setup-qemu-action@v1
38+
39+ - name : Set up Docker Buildx
40+ uses : docker/setup-buildx-action@v1
41+
42+ - name : Login to DockerHub
43+ uses : docker/login-action@v1
44+ with :
45+ registry : docker.io
46+ username : ${{ secrets.DOCKER_USER }}
47+ password : ${{ secrets.DOCKER_TOKEN }}
48+
49+ - name : Login to Quay
50+ uses : docker/login-action@v1
51+ with :
52+ registry : quay.io
53+ username : ${{ secrets.QUAY_USERNAME }}
54+ password : ${{ secrets.QUAY_TOKEN }}
55+
56+ - name : Build and push
57+ id : docker_build
58+ uses : docker/build-push-action@v2
59+ with :
60+ push : true
61+ tags : ${{steps.setup.outputs.tags}}
62+
63+ - name : Image digest
64+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1- FROM quay .io/ibmgaragecloud /node:lts-stretch as builder
1+ FROM docker .io/node:lts-stretch as builder
22
33RUN apt-get update && apt-get -y install libjemalloc1
44ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
@@ -17,6 +17,6 @@ COPY --chown=1001:0 . .
1717
1818RUN npm ci && npm run clean && npm run build
1919
20- FROM quay .io/bitnami/nginx
20+ FROM docker .io/bitnami/nginx
2121
2222COPY --from=builder /home/dev/app/public /app
You can’t perform that action at this time.
0 commit comments