From 1c4793b2021c53e77e85d6eca97e9025e95e1ae6 Mon Sep 17 00:00:00 2001 From: Bill Church Date: Fri, 29 Jul 2022 12:46:36 -0400 Subject: [PATCH] test: workflow --- .github/workflows/action-test.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/action-test.yml b/.github/workflows/action-test.yml index bcd3577..8d09208 100644 --- a/.github/workflows/action-test.yml +++ b/.github/workflows/action-test.yml @@ -17,12 +17,21 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ inputs.tag }} - - - name: 'get sha' + - name: Prepare + id: prep run: | - echo "SHORTREF=${GITHUB_SHA::8}" >> $GITHUB_ENV + DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/} + VERSION=latest + SHORTREF=$(git rev-parse --short=8 ${{ inputs.tag }}) + + VERSION=${{ inputs.tag }} + fi + TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}" + + # Set output parameters. + echo ::set-output name=tags::${TAGS} + echo ::set-output name=docker_image::${DOCKER_IMAGE} - echo "MYSHA=$(git rev-parse --short ${{ inputs.tag }})" >> $GITHUB_ENV - name: env run: env