gravitystorm left a comment (openstreetmap/openstreetmap-website#6822)

Hmm, I'm running into this again. I want to run some actions on my fork, and I 
don't want to open a PR first since everyone will get multiple notifications if 
I push multiple times and need to try different approaches.

So there's two options that I see:

* Revert this, and just live with the double-ci runs for dependabot
* Get more clever with the CI configuration, so that CI:
  * runs on non-push events, and
  * runs on push events so long as it's a different repo, and
  * runs on push events on this repo if they are on the master branch

e.g. 

```diff
--- a/.github/workflows/devcontainer.yml
+++ b/.github/workflows/devcontainer.yml
@@ -2,8 +2,6 @@ name: Development Container
 
 on:
   push:
-    branches:
-      - master
   pull_request:
 
 concurrency:
@@ -12,6 +10,10 @@ concurrency:
 
 jobs:
   test:
+    if: >-
+      github.event_name != 'push' ||
+      github.repository != 'openstreetmap/openstreetmap-website' ||
+      github.ref == 'refs/heads/master'
     runs-on: ubuntu-latest
     steps:
       - name: Checkout (GitHub)
```

... but the logic needs repeating for every yaml file and is a bit clunky.

Personally I'd go for option 1 and just accept the double-running, but I don't 
know whether that's causing any annoyance to anyone.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6822#issuecomment-4040867890
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/issues/6822/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to