Skip to content

Commit ab0d5bc

Browse files
chore: always push a new image after merging on main (#2850)
The continuous-integration was only actually pushing images when a PR was labeled with "always push images", but we should also produce the images whenever a new commit is pushed on main or a release branch. This will ensure that the `ghcr.io/cloudnative-pg/cloudnative-pg-testing` main and release-* images are updated as soon as a new commit is pushed (up until now it was done only once per day via the continuous-delivery workflow) Signed-off-by: Niccolò Fei <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]> Co-authored-by: Gabriele Bartolini <[email protected]>
1 parent 7658d54 commit ab0d5bc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/continuous-integration.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,12 @@ jobs:
374374
echo "DATE=${commit_date}" >> $GITHUB_ENV
375375
echo "VERSION=${commit_version}" >> $GITHUB_ENV
376376
echo "COMMIT=${commit_short}" >> $GITHUB_ENV
377-
echo "PUSH=false" >> $GITHUB_ENV
377+
if [[ "${GITHUB_REF#refs/heads/}" =~ ^(main|release-) ]]
378+
then
379+
echo "PUSH=true" >> $GITHUB_ENV
380+
else
381+
echo "PUSH=false" >> $GITHUB_ENV
382+
fi
378383
379384
- name: Check PR label conditions
380385
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)