Skip to content

Commit

Permalink
💚 Fix GH Actions syntaxe
Browse files Browse the repository at this point in the history
  • Loading branch information
llaumgui authored Jan 26, 2024
1 parent f470f2a commit 4f0643c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/devops.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: DevOps
on:
[push, pull_request]

env:
pythonLastVersion: '3.11'
GHCR_REGISTRY: ghcr.io
Expand Down Expand Up @@ -57,7 +56,7 @@ jobs:
# Dockerfile tests
#
test_dockerfiles:
if: github.event.schedule == ''
if: ${{ github.event.schedule == '' }}
runs-on: ubuntu-latest
name: Linters for Dockerfile
steps:
Expand All @@ -72,7 +71,7 @@ jobs:
# SonarCloud job
#
test_sonar:
if: github.event_name != 'pull_request'
if: ${{ github.event_name != 'pull_request' }}
needs: [
test_python,
test_markdownlint,
Expand Down Expand Up @@ -175,7 +174,7 @@ jobs:
# Build and deploy job (only on main)
#
docker_build_deploy:
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || ${{ startsWith(github.ref, 'refs/tags/v') }})
if: ${{ github.event_name != 'pull_request' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') ) }}
needs: [
test_docker
]
Expand Down Expand Up @@ -209,7 +208,7 @@ jobs:
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
if: github.ref == 'refs/heads/main'
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
Expand Down

0 comments on commit 4f0643c

Please sign in to comment.