test: workflow
This commit is contained in:
parent
673435c624
commit
1c4793b202
1 changed files with 13 additions and 4 deletions
17
.github/workflows/action-test.yml
vendored
17
.github/workflows/action-test.yml
vendored
|
@ -17,12 +17,21 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.tag }}
|
ref: ${{ inputs.tag }}
|
||||||
|
- name: Prepare
|
||||||
- name: 'get sha'
|
id: prep
|
||||||
run: |
|
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
|
- name: env
|
||||||
run: env
|
run: env
|
||||||
|
|
Loading…
Reference in a new issue