From 42c39578c36c1426e4f9fea36bb0c44cbd19f4a2 Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:16:39 -0400 Subject: [PATCH] Fix examples syntax (#69) Fixes #66 --- examples/only-setup-defaults/buf-ci.yaml | 4 ++-- examples/skip-on-commits/buf-ci.yaml | 12 +++--------- examples/skip-on-labels/buf-ci.yaml | 12 +++--------- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/examples/only-setup-defaults/buf-ci.yaml b/examples/only-setup-defaults/buf-ci.yaml index cccf2af..ca01d9d 100644 --- a/examples/only-setup-defaults/buf-ci.yaml +++ b/examples/only-setup-defaults/buf-ci.yaml @@ -29,7 +29,7 @@ jobs: run: | buf breaking --error-format github-actions --against \ ${{ github.event.repository.clone_url }}#format=git,tag=${{ github.event.pull_request.base.sha || github.event.before }} - - if: github.event_name == 'push' && + - if: ${{ github.event_name == 'push' }} run: buf push --error-format github-actions --create --git-metadata - - if: github.event_name == 'delete' + - if: ${{ github.event_name == 'delete' }} run: buf beta registry archive --label ${{ github.ref_name }} diff --git a/examples/skip-on-commits/buf-ci.yaml b/examples/skip-on-commits/buf-ci.yaml index b7582b7..5de3a84 100644 --- a/examples/skip-on-commits/buf-ci.yaml +++ b/examples/skip-on-commits/buf-ci.yaml @@ -13,12 +13,6 @@ jobs: - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} - lint: | - github.event_name == 'push' && \ - !contains(github.event.head_commit.message, 'buf skip lint') - format: | - github.event_name == 'push' && \ - !contains(github.event.head_commit.message, 'buf skip format') - breaking: | - github.event_name == 'push' && \ - !contains(github.event.head_commit.message, 'buf skip breaking') + lint: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, 'buf skip lint') }} + format: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, 'buf skip format') }} + breaking: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, 'buf skip breaking') }} diff --git a/examples/skip-on-labels/buf-ci.yaml b/examples/skip-on-labels/buf-ci.yaml index 37637a8..9fd1ce4 100644 --- a/examples/skip-on-labels/buf-ci.yaml +++ b/examples/skip-on-labels/buf-ci.yaml @@ -15,12 +15,6 @@ jobs: - uses: bufbuild/buf-action@v1 with: token: ${{ secrets.BUF_TOKEN }} - lint: | - github.event_name == 'pull_request' && \ - !contains(github.event.pull_request.labels.*.name, 'buf skip lint') - format: | - github.event_name == 'pull_request' && \ - !contains(github.event.pull_request.labels.*.name, 'buf skip format') - breaking: | - github.event_name == 'pull_request' && \ - !contains(github.event.pull_request.labels.*.name, 'buf skip breaking') + lint: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip lint') }} + format: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip format') }} + breaking: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip breaking') }}