diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 974b01c..8393601 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,14 +28,16 @@ jobs: path: build/libs/*.jar - uses: docker/login-action@v4 - if: github.event_name == 'push' + if: github.event_name == 'push' && github.actor != 'dependabot[bot]' with: registry: ghcr.io/raeperd username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Get branch name - if: github.event_name == 'push' - run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr /# -)" >> $GITHUB_ENV + if: github.event_name == 'push' && github.actor != 'dependabot[bot]' + run: | + BRANCH_NAME=$(printf '%s' "$GITHUB_REF_NAME" | tr '/#' '-') + echo "BRANCH_NAME=$BRANCH_NAME" >> "$GITHUB_ENV" - name: Build container image - if: github.event_name == 'push' - run: ./gradlew jib -Djib.to.tags=${{ env.BRANCH_NAME }} \ No newline at end of file + if: github.event_name == 'push' && github.actor != 'dependabot[bot]' + run: ./gradlew jib -Djib.to.tags="$BRANCH_NAME"