Gleam: Avoid duplicate GitHub actions builds for PRs

Created on 28 Oct 2019  ·  11Comments  ·  Source: gleam-lang/gleam

We build for both PR and push it seems. Make the push only build on master.

Possibly something like this:

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

Currently blocked as actions doesn't seem to work on this new GitHub organisation.

help wanted

Most helpful comment

I published “skip-duplicate-actions” to solve this problem: https://github.com/marketplace/actions/skip-duplicate-actions
You could give it a try if it is still an issue.

All 11 comments

This should be a simple fix. I subscribed to this issue. Please, share the response of the GitHub support about the actions in new org.

I found this snippet here which says _on push or pull request_. That's what we want.

# Trigger the workflow on push or pull request
on: [push, pull_request]

So maybe it's not running twice. Do you have a link to such action runs? Maybe we're just confused. 😁

This is exactly what I originally proposed and never had any problems with.

It shows 2 builds for each OS ATM and I've seen some where each for the same OS row has a different duration. We can add the printing of a random value to the build to test once they are working again.

I would really like to fix this. Could you provide me with steps to reproduce this issue?

I'll try to reproduce once GitHub have fixed actions on this organisation. Currently they do not run

Here's an example from your PR https://github.com/EskiMag/gleam/runs/281784678

It looks like there's 3 builds there, each with different durations taken. Perhaps I'm misunderstanding the UI?

Screenshot 2019-10-30 at 23 05 15

Screenshot 2019-10-30 at 23 06 01
Screenshot 2019-10-30 at 23 05 52
Screenshot 2019-10-30 at 23 05 41

Those are runs which happened in a 3-hour window, not at the same time. Those happened on the same commit because I was experimenting with releases creation.
With new release, there's also a new tag created on the specified commit. In this case it was 3 tags on the same commit and now UI is just grouping those runs for this commit I think. But I am too often confused by the UI.
Anyway, I'll keed an eye on this just to be sure.

Fab! I'll keep this open so I can test with a normal PR once GitHub have fixed this organisation so it runs actions. #310

Seems to be working now! Perhaps it was my mistake :)

I published “skip-duplicate-actions” to solve this problem: https://github.com/marketplace/actions/skip-duplicate-actions
You could give it a try if it is still an issue.

Was this page helpful?
0 / 5 - 0 ratings