Skip to content

Odd continue-on-error Behaviour wrt Workflow Status #39380

Description

@nephatrine

Gitea Version

1.27.3

What happened?

Well I'm not sure whether this is actually a bug or intended behaviour. I have an action workflow that is set up like this (stripped down example):

name: Do Cool Stuff
run-name: ${{ gitea.actor }} pushed to ${{ gitea.repository }}:${{ gitea.ref_name }}
on:
  push:
    branches:
      - "master"
  schedule:
    - cron: "TZ=America/New_York 0 7 * * 1"
jobs:
  build_images:
    strategy:
      matrix:
        include:
          - runner: myrunner-amd64_32
          - runner: myrunner-arm64_32
          - runner: myrunner-armhf
          - runner: myrunner-i386
    runs-on: ${{matrix.runner}}
    continue-on-error: true
    steps:
      - name: Do Stuff
        run: echo something important that fails && false
  build_manifest:
    needs: [build_images]
    runs-on: myrunner-any
    continue-on-error: true
    steps:
      - name: Clean Up Or Finalize
        run: echo something thats not super important but should always be done

(it doesn't need to use a matrix or anything like that so could be made more minimal thats just how I run them)

When this runs, if the first job fails, it continues onto the second job thanks to the continue-on-error and that is what I intend, but then the whole workflow itself is marked as a success in the dashboard even though those four jobs all failed. I can understand that in some circumstances a continue-on-error job might be "optional" and this might be desired behaviour. In circumstances like mine though, those jobs are actually the important ones that I want to have visibility into the failure of. So when I look in my actions and see this:

Image

That looks like a successful run and it's kinda weird to click into that and see what to me looks like it should have been a failure.

Image

If this is the intended way things should work, is there some other way to specify something like continue-on-error that allows the next step to be taken but still counts towards the workflow's overall success/failure?

I do not think I had this issue on the previous 1.26.4 version of Gitea... but can't verify at the moment.

How are you running Gitea?

Docker. Alpine Linux 3.24. SQLite.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions