diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 9a0fbe9a7..b92716cc5 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -13,6 +13,10 @@ on: required: false default: 'false' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: PUPPETEER_SKIP_DOWNLOAD: "true" COREPACK_NPM_REGISTRY: "https://registry.npmmirror.com" @@ -89,12 +93,12 @@ jobs: DOMAIN="e-tib.com" PRJ="etib" - if [[ "${{ github.ref_type }}" == "branch" && "$REF" == "main" ]]; then + if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then TARGET="testing" IMAGE_TAG="main-${SHORT_SHA}" ENV_FILE=".env.testing" TRAEFIK_HOST="test.${DOMAIN}" - elif [[ "${{ github.ref_type }}" == "tag" ]]; then + elif [[ "${{ github.ref }}" == refs/tags/* ]]; then if [[ "$REF" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then TARGET="production" IMAGE_TAG="$REF"