Skip to content

Commit 61b7e9a

Browse files
authored
Merge pull request #4 from hardillb/respin
Respin
2 parents 1e5924a + 620cb55 commit 61b7e9a

File tree

1 file changed

+40
-25
lines changed

1 file changed

+40
-25
lines changed

.github/workflows/main.yml

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ name: Docker Build
44

55
# Controls when the action will run.
66
on:
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
required: true
11+
type: string
12+
description: "Version"
713
release:
814
types: [published]
915

@@ -66,7 +72,16 @@ jobs:
6672
fi
6773
done <<< "${{ steps.meta.outputs.tags }}"
6874
69-
TRAVIS_TAG=$(echo $GITHUB_REF | awk -F '/' '{ print $3}')
75+
echo "version = ${{ github.events.inputs.version}}"
76+
77+
if [ -z "${{ github.events.inputs.version }}"]; then
78+
TRAVIS_TAG={{ github.events.inputs.version }}
79+
else
80+
TRAVIS_TAG=$(echo $GITHUB_REF | awk -F '/' '{ print $3}')
81+
fi
82+
83+
echo "TRAVIS_TAG = $TRAVIS_TAG"
84+
7085
if [[ "$TRAVIS_TAG" =~ ^v[0-9\.-]*$ ]]; then
7186
IMAGE=${{ env.DEFAULT_IMAGE }}
7287
PUSH="true"
@@ -101,31 +116,31 @@ jobs:
101116
echo "::set-output name=push::$PUSH"
102117
echo "::set-output name=version::$(echo $GITHUB_REF | awk -F '/' '{ print $3}')"
103118
echo "::set-output name=buildVersion::$VERSION"
104-
-
105-
name: Login to DockerHub
106-
uses: docker/login-action@v1
107-
with:
108-
username: ${{ secrets.DOCKERHUB_USERNAME }}
109-
password: ${{ secrets.DOCKERHUB_TOKEN }}
110-
-
111-
name: Build and push
112-
id: build-push
113-
uses: docker/build-push-action@v2
114-
continue-on-error: true
115-
with:
116-
context: .
117-
platforms: linux/amd64, linux/arm64, linux/s390x, linux/arm/v7, linux/arm/v6
118-
push: ${{ steps.nrVersion.outputs.push }}
119-
file: .docker/Dockerfile.alpine
120-
build-args: |
121-
NODE_VERSION=${{ matrix.node }}
122-
BUILD_DATE=${{ steps.date.outputs.date }}
123-
BUILD_VERSION=${{ steps.nrVersion.outputs.buildVersion }}
124-
BUILD_REF=${{ env.GITHUB_SHA }}
125-
NODE_RED_VERSION=${{ steps.nrVersion.outputs.version }}
126-
TAG_SUFFIX=${{ matrix.suffix }}
119+
# -
120+
# name: Login to DockerHub
121+
# uses: docker/login-action@v1
122+
# with:
123+
# username: ${{ secrets.DOCKERHUB_USERNAME }}
124+
# password: ${{ secrets.DOCKERHUB_TOKEN }}
125+
# -
126+
# name: Build and push
127+
# id: build-push
128+
# uses: docker/build-push-action@v2
129+
# continue-on-error: true
130+
# with:
131+
# context: .
132+
# platforms: linux/amd64, linux/arm64, linux/s390x, linux/arm/v7, linux/arm/v6
133+
# push: ${{ steps.nrVersion.outputs.push }}
134+
# file: .docker/Dockerfile.alpine
135+
# build-args: |
136+
# NODE_VERSION=${{ matrix.node }}
137+
# BUILD_DATE=${{ steps.date.outputs.date }}
138+
# BUILD_VERSION=${{ steps.nrVersion.outputs.buildVersion }}
139+
# BUILD_REF=${{ env.GITHUB_SHA }}
140+
# NODE_RED_VERSION=${{ steps.nrVersion.outputs.version }}
141+
# TAG_SUFFIX=${{ matrix.suffix }}
127142

128-
tags: ${{ steps.nrVersion.outputs.tags }}
143+
# tags: ${{ steps.nrVersion.outputs.tags }}
129144

130145
# -
131146
# name: Sign Image

0 commit comments

Comments
 (0)