fix: run renaming workflow if branch == main (#58)

## Why this should be merged

#51 had a bug when checking whether or not to open a PR. I was
originally blocking everything if _not_ on main instead of doing
something if on it. The [manually dispatched run therefore didn't open a
PR as
expected](https://github.com/ava-labs/libevm/actions/runs/11299366394/job/31430160561).

## How this works

Change `!=` to `==`

## How this was tested

n/a

Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
This commit is contained in:
Arran Schlosberg 2024-10-11 22:35:31 +01:00 committed by GitHub
parent a8cc7bd033
commit 21122c043a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,7 +71,7 @@ jobs:
- name: Open PR to "renamed-go-module" iff workflow dispatched on "main"
# If we are changing the way in which we manage module renaming then it
# MUST go through PR review to main; only then can it open PRs.
if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main'
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
uses: devops-infra/action-pull-request@v0.5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}