1

I have a simple workflow that calls a reusable workflow to build a container image. In my case the job won't start as scheduled at all. I know the trigger schedule will only work from the master branch on the repo executing the workflow and we have indeed both caller workflow and reusable workflow in the master/default branch.

name: build image

on:
  push:
    branches: [ 'master' ]
  pull_request:
  schedule:
    - cron: "0 8 * * 1-5"
jobs:
  build_container_dateTag:
    uses: MyOrganizationName/my-workflows/.github/workflows/workflow-build.yaml@master
    with:
      staticTag: true
      ImageName: 'myimage'
      ImageTag: 'mytag'

Just wondering if someone has had the same experience. The job was working fine previously without the reusable workflow and all container build steps within this workflow and it works fine on push to master.

We are running on GHES 3.4.7

Andre Santana
  • 33
  • 1
  • 4
  • Shouldn't you use directly `.github/workflows/workflow-build.yaml@master` instead of `workflows/my-workflows/.github/workflows/workflow-build.yaml@master` in the syntax? The workflow might not be valid for being called. – GuiFalourd Sep 30 '22 at 13:36
  • Hi @GuiFalourd, the reusable workflows I am trying to call are located in an separated repository and used in multiple pipelines. It build images for all applications on our repo. As mentioned, it alll works fine on other triggers (push to master and create PRs). The only thing it doesnt work is indeed the schedule. I would asssume syntaxwise it's everything fine – Andre Santana Oct 04 '22 at 07:02
  • I've got many workflows with a similar syntax and all work fine on multiple trigger so if the workflow is working on other triggers, it should work on schedule as well. Could it be a special rule from the organization regarding automated triggers? Or the workflow with the `schedule` trigger not being on the default repo branch? – GuiFalourd Oct 04 '22 at 12:38
  • yes, I have asked the admin and they are not aware of any limitations/special rule.. Also caller workflow is def on default repo branch. Also reusable workflows are also in the default branch of its repo. Do you have workflows working with this specific combination? Reusable workflow being called on a schedule trigger and they work fine? – Andre Santana Oct 04 '22 at 13:40
  • 1
    I've tested here on a [POC](https://github.com/GuillaumeFalourd/poc-github-actions/actions/runs/3184204079) and it triggered the main workflow (with reusable workflows) on schedule. [Workflow file as reference](https://github.com/GuillaumeFalourd/poc-github-actions/blob/main/.github/workflows/48-trigger-reusables.yml) – GuiFalourd Oct 04 '22 at 17:36
  • 2
    aewsome @GuiFalourd. I have tested exactly your workflow on my side and works on push but it's not working on schedule. I have opened now a support ticket with github. I can only assume it's a problem with the ghes version I am running. tks so much! – Andre Santana Oct 05 '22 at 06:51

1 Answers1

0

Update to this problem. An update to GHES 3.5.6 fixed it. I had to remove and re-add my workflow from the default branch though

Andre Santana
  • 33
  • 1
  • 4