Skip to content

Commit ab0d5bc

Browse files
chore: always push a new image after merging on main (cloudnative-pg#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 <niccolo.fei@enterprisedb.com> Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
1 parent 7658d54 commit ab0d5bc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/continuous-integration.yml

+6-1
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)