Skip to content

Commit

Permalink
Fix invalid GitHub Action YAML files (agama-project#1707)
Browse files Browse the repository at this point in the history
## Problem

- The GitHub Actions fail with this error: `The workflow is not valid.
.github/workflows/weblate-update-pot.yml: Unexpected tag
'!github.event.repository.fork'`

## Solution

- From the documentation: You must always use the `${{ }}` expression
syntax or escape with `''`, `""`, or `()` when the expression starts
with `!`, since `!` is reserved notation in YAML format.
- See
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/using-conditions-to-control-job-execution
  • Loading branch information
lslezak authored Oct 29, 2024
2 parents a099d97 + 1b494b4 commit 6106b68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/weblate-merge-po.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pull-requests: write

# do not run in forks
if: !github.event.repository.fork
if: ${{ !github.event.repository.fork }}

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weblate-merge-products-po.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pull-requests: write

# do not run in forks
if: !github.event.repository.fork
if: ${{ !github.event.repository.fork }}

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weblate-merge-service-po.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pull-requests: write

# do not run in forks
if: !github.event.repository.fork
if: ${{ !github.event.repository.fork }}

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weblate-update-pot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
update-pot:
# do not run in forks
if: !github.event.repository.fork
if: ${{ !github.event.repository.fork }}

runs-on: ubuntu-latest

Expand Down

0 comments on commit 6106b68

Please sign in to comment.