Files
cnpg-postgres-containers/.github/workflows/update.yml
dependabot[bot] 04047f3d6b chore(deps): Bump actions/checkout from 3 to 4 (#65)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 14:31:17 +02:00

58 lines
1.7 KiB
YAML

name: Automatic Updates
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
build:
name: Run update script
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_GHA_PAT }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Run update script
uses: nick-fields/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
command: |
# pip-tools provides pip-compile used by update.sh
pip3 install --upgrade pip-tools pip
export PATH=$HOME/.local/bin:$PATH
echo "Updating Debian images"
./Debian/update.sh
- name: Diff
run: |
git status
git diff
- name: Temporarily disable "include administrators" branch protection
if: ${{ always() && github.ref == 'refs/heads/main' }}
id: disable_include_admins
uses: benjefferies/branch-protection-bot@1.0.9
with:
access_token: ${{ secrets.REPO_GHA_PAT }}
branch: main
enforce_admins: false
- uses: EndBug/add-and-commit@v9
with:
author_name: CloudNativePG Automated Updates
author_email: noreply@cnpg.com
message: 'Daily automatic update'
- name: Enable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@1.0.9
if: ${{ always() && github.ref == 'refs/heads/main' }}
with:
access_token: ${{ secrets.REPO_GHA_PAT }}
branch: main
enforce_admins: ${{ steps.disable_include_admins.outputs.initial_status }}