diff --git a/.github/workflows/docker-img-push.yaml b/.github/workflows/docker-img-push.yaml index ae868ce..a57e3b4 100644 --- a/.github/workflows/docker-img-push.yaml +++ b/.github/workflows/docker-img-push.yaml @@ -37,6 +37,13 @@ jobs: if [ "${{ github.event.inputs.version }}" != "" ]; then echo "TAG_NAME=${{ github.event.inputs.version }}" >> "${GITHUB_ENV}" fi; + - name: Set variable based on actor + run: | + if [[ "${{ github.actor }}" == *"bot"* ]]; then + echo "GITHUB_ACTOR=bot" >> $GITHUB_ENV + else + echo "GITHUB_ACTOR=${{ github.actor }}" >> $GITHUB_ENV + fi - name: Build Docker image only if: github.event_name == 'pull_request' uses: docker/build-push-action@v6 @@ -45,7 +52,7 @@ jobs: file: Dockerfiles/${{ matrix.dockerfile }} push: false load: true - tags: ghcr.io/${{ github.actor }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }} + tags: ghcr.io/${{ env.GITHUB_ACTOR }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }} - name: Build and push Docker image if: github.event_name == 'push' uses: docker/build-push-action@v6 @@ -54,10 +61,10 @@ jobs: file: Dockerfiles/${{ matrix.dockerfile }} push: true load: true - tags: ghcr.io/${{ github.actor }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }} + tags: ghcr.io/${{ env.GITHUB_ACTOR }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }} - name: Save Docker image to tarball run: | - docker run -t --name wsl_export ghcr.io/${{ github.actor }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }} ls + docker run -t --name wsl_export ghcr.io/${{ env.GITHUB_ACTOR }}/${{ env.IMG_REPO_NAME }}:${{ env.TAG_NAME }} ls docker export wsl_export > ${{ env.IMG_REPO_NAME }}.tar - name: Check if release exists id: check-release diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1d57799..f5b550d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: - id: codespell # Gitleaks for detecting secrets in Git repositories - repo: https://github.com/gitleaks/gitleaks - rev: "v8.18.4" + rev: "v8.19.2" hooks: - id: gitleaks # Talisman for pre-commit Git hooks to detect sensitive files