Closed AttackingOrDefending closed 2 months ago
Hi,
Maybe adding /.github/workflows/docker.yml
is better than removing the whole file condition?
The idea behind this file condition is a first step to prevent several strictly identical images with different version numbers.
It Assumes that the lib/versioning.yml
is a safe way to track new versions. Unfortunately, if I understand correctly how the versioning.yml
workflow works, it is currently not: A new version number is generated each time there's a push into the master
branch, even if it is a correction in the wiki.
Nevertheless, if the file condition remains, it simply remains to fix the versioning.yml
action to prevent incrementing lib/versioning.yml
when nothing changes in the application (probably with an appropriate file condition on versioning.yml
workflow).
But maybe I'm wrong about the meaning of lib/versioning.yml
?
Maybe adding
/.github/workflows/docker.yml
is better than removing the whole file condition?
Ooops, this will not work, as it seems the push made by versioning
workflow does not trigger any workflow (Sorry, I tested it changing myself the lib/versioning.yml
file).
I will test a solution based on versioning
workflow completion ...
In order to have docker CI
running when Versioning
succeeds, you should replace the following in docker.yml
:
on:
push:
branches:
- master
paths:
- lib/versioning.yml
env:
GB_REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
by this:
on:
workflow_run:
workflows: ["Versioning"]
types:
- completed
env:
GB_REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
Warning:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
in the build
job; It prevents the job from running if the Versioning
workflow is triggered but fails.I implemented your change. I removed the quotes because the examples in the docs didn't have them.
Ready to merge?
Yes.
Type of pull request:
Description:
Since the commit is made thorugh github actions, github doesn't rerun the workflows, so the docker is not built.
Related Issues:
Related to #936
Checklist:
Screenshots/logs (if applicable):