Skip to content

Commit

Permalink
Update dockerimage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus authored Mar 20, 2024
1 parent 41c7b79 commit f1848f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
type=semver,pattern={{major}}
type=sha
- uses: docker/login-action@v3
if: ${{ github.ref == 'refs/heads/main' }}
if: github.ref == 'refs/heads/main'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -56,7 +56,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Sign the published Docker image
if: ${{ github.ref == 'refs/heads/main' }}
if: github.ref == 'refs/heads/main'
env:
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
Expand All @@ -74,15 +74,15 @@ jobs:
working-directory: ${{ env.IMAGE }}
run: docker compose -f docker-compose.test.yml run sut
- name: Set RELEASE
if: ${{ github.ref == 'refs/heads/main' }}
if: github.ref == 'refs/heads/main'
run: |
# shellcheck disable=SC2086
RC="$(\grep ${IMAGE}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/^.*://')"
if [[ "${RC}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && ! \git show-ref --tags --verify --quiet "refs/tags/v${RC}" ; then
\echo "RELEASE=${RC}" >> "${GITHUB_ENV}"
fi
- name: Trigger release
if: ${{ env.RELEASE != '' }}
if: env.RELEASE != ''
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
Expand Down

0 comments on commit f1848f3

Please sign in to comment.