File tree Expand file tree Collapse file tree 2 files changed +30
-5
lines changed
Expand file tree Collapse file tree 2 files changed +30
-5
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ echo " $DOCKER_PASSWORD " | docker login -u " $DOCKER_USERNAME " --password-stdin
4+
5+ export DOCKER_ORG=" travisghansen"
6+ export DOCKER_PROJECT=" freenas-iscsi-provisioner"
7+ export DOCKER_REPO=" ${DOCKER_ORG} /${DOCKER_PROJECT} "
8+
9+ if [[ $GITHUB_REF == refs/tags/* ]]; then
10+ export GIT_TAG=${GITHUB_REF# refs/ tags/ }
11+ else
12+ export GIT_BRANCH=${GITHUB_REF# refs/ heads/ }
13+ fi
14+
15+ if [[ -n " ${GIT_TAG} " ]]; then
16+ docker buildx build --build-arg " GIT_TAG=${GIT_TAG} " --progress plain --pull --push --platform " ${DOCKER_BUILD_PLATFORM} " -t ${DOCKER_REPO} :${GIT_TAG} .
17+ elif [[ -n " ${GIT_BRANCH} " ]]; then
18+ if [[ " ${GIT_BRANCH} " == " master" ]]; then
19+ docker buildx build --progress plain --pull --push --platform " ${DOCKER_BUILD_PLATFORM} " -t ${DOCKER_REPO} :latest .
20+ else
21+ docker buildx build --progress plain --pull --push --platform " ${DOCKER_BUILD_PLATFORM} " -t ${DOCKER_REPO} :${GIT_BRANCH} .
22+ fi
23+ else
24+ :
25+ fi
Original file line number Diff line number Diff line change 1515
1616* .swp
1717* .swo
18- bin /
19- vendor /
20- tmp /
21- bin_release /
22- manifests /
18+ / bin /
19+ / vendor /
20+ / tmp /
21+ / bin_release /
22+ / manifests /
You can’t perform that action at this time.
0 commit comments