From 3e0807e39182970d9e92c4a56e18acdff68fa8eb Mon Sep 17 00:00:00 2001 From: Daniel Plop <1534513+dantp-ai@users.noreply.github.com> Date: Sun, 18 Aug 2024 10:14:46 +0200 Subject: [PATCH] Never push to registry with linting workflow (#16) --- .github/workflows/lint-format-typecheck.yaml | 6 +----- .github/workflows/pytest.yaml | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-format-typecheck.yaml b/.github/workflows/lint-format-typecheck.yaml index e51ff51..40023b1 100644 --- a/.github/workflows/lint-format-typecheck.yaml +++ b/.github/workflows/lint-format-typecheck.yaml @@ -42,11 +42,7 @@ jobs: uses: devcontainers/ci@v0.3 with: imageName: ghcr.io/${{ secrets.GH_DOCKER_REGISTRY_NAMESPACE }}/${{ vars.CONTAINER_IMAGE_NAME }} - # Push new container image if `eventFilterForPush` and `refFilterForPush` (by default allow all branches to trigger a push of the container image) are true - push: filter - # Push new image only if event name that triggered this workflow matches `push` - # If a pull request triggered it, then skip pushing new container image to registry - eventFilterForPush: push + push: never runCmd: | poetry run ruff check --fix poetry run ruff format . diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 6f566d2..d126dfd 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -41,7 +41,10 @@ jobs: uses: devcontainers/ci@v0.3 with: imageName: ghcr.io/${{ secrets.GH_DOCKER_REGISTRY_NAMESPACE }}/${{ vars.CONTAINER_IMAGE_NAME }} + # Push new container image if `eventFilterForPush` and `refFilterForPush` (by default allow all branches to trigger a push of the container image) are true push: filter + # Push new image only if event name that triggered this workflow matches `push` + # If a pull request triggered it, then skip pushing new container image to registry eventFilterForPush: push runCmd: | poetry run pytest