File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+ - master
10+ - lite
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/cli-tools"
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 1414 # Steps represent a sequence of tasks that will be executed as part of the job
1515 steps :
1616 # Drafts your next Release notes as Pull Requests are merged into "master"
17- - uses : rlespinasse/github-slug-action@1.1.1
17+ - uses : rlespinasse/github-slug-action@v3.x
1818
1919 - uses : release-drafter/release-drafter@v5
2020 with :
You can’t perform that action at this time.
0 commit comments