diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 407b66e7..5da00ae4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,12 @@ name: Docker Build # Controls when the action will run. on: + workflow_dispatch: + inputs: + version: + required: true + type: string + description: "Version" release: types: [published] @@ -66,20 +72,35 @@ jobs: fi done <<< "${{ steps.meta.outputs.tags }}" - TRAVIS_TAG=$(echo $GITHUB_REF | awk -F '/' '{ print $3}') + echo "Start Tags = $TAGS" + echo "GITHUB_REF= $GITHUB_REF" + + echo "version = ${{ github.event.inputs.version }}" + + if [[ ! -z "${{ github.event.inputs.version }}" ]]; then + TEMP=${{ github.event.inputs.version }} + TEMP=${TEMP:1} + TEMP2=$(echo $GITHUB_REF | awk -F '/' '{ print $3}') + echo "$GITHUB_REF - $TEMP" + TAGS=$(echo $TAGS | sed "s/$TEMP2/$TEMP/") + TRAVIS_TAG=${{ github.event.inputs.version }} + else + TRAVIS_TAG=$(echo $GITHUB_REF | awk -F '/' '{ print $3}') + fi + echo "TRAVIS_TAG = $TRAVIS_TAG" + if [[ "$TRAVIS_TAG" =~ ^v[0-9\.-]*$ ]]; then IMAGE=${{ env.DEFAULT_IMAGE }} PUSH="true" VERSION=${TRAVIS_TAG:1} + STABLE_VERSION=`echo ${VERSION} | sed -r 's/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)$/\1.\2/'` if [[ "${{ matrix.node }}" == "${{ env.LATEST_NODE }}" && "${{ matrix.suffix }}" == "" ]]; then - TAGS="$TAGS,$IMAGE:$VERSION" + TAGS="$TAGS,$IMAGE:$VERSION,$IMAGE:$STABLE_VERSION" elif [[ "${{ matrix.node }}" == "${{ env.LATEST_NODE }}" && "${{ matrix.suffix }}" == "-minimal" ]]; then TAGS="$TAGS,$IMAGE:$VERSION-minimal" fi - # TAGS="$TAGS,$IMAGE:latest-${{ matrix.node }}${{ matrix.suffix }}" - else IMAGE=${{ env.DEV_IMAGE }} if [[ "$TRAVIS_TAG" == *"dev"* || "$TRAVIS_TAG" == *"beta"* ]]; then @@ -96,10 +117,15 @@ jobs: echo $TAGS - echo "::set-output name=tags::$TAGS" - echo "::set-output name=push::$PUSH" - echo "::set-output name=version::$(echo $GITHUB_REF | awk -F '/' '{ print $3}')" - echo "::set-output name=buildVersion::$VERSION" + # echo "::set-output name=tags::$TAGS" + # echo "::set-output name=push::$PUSH" + # echo "::set-output name=version::$(echo $GITHUB_REF | awk -F '/' '{ print $3}')" + # echo "::set-output name=buildVersion::$VERSION" + + echo "tags=$TAGS" >> $GITHUB_OUTPUT + echo "push=$PUSH" >> $GITHUB_OUTPUT + echo "version=$TRAVIS_TAG" >> $GITHUB_OUTPUT + echo "buildVersion=$VERSION" >> $GITHUB_OUTPUT - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/docker-custom/known_hosts.sh b/docker-custom/known_hosts.sh index bd0ccfd6..9ab173bb 100755 --- a/docker-custom/known_hosts.sh +++ b/docker-custom/known_hosts.sh @@ -45,15 +45,17 @@ ssh-keygen -l -f ${known_hosts_file} | sort > "$fingerprints" diff - "$fingerprints" <