diff --git a/.github/workflows/acquia-cleanup.yml b/.github/workflows/acquia-cleanup.yml index 3901e2473..3d23ecba4 100644 --- a/.github/workflows/acquia-cleanup.yml +++ b/.github/workflows/acquia-cleanup.yml @@ -1,16 +1,27 @@ # .github/workflows/acquia-cleanup.yml # Clean up stale site backups and branches on Acquia name: Acquia Cleanup -on: - schedule: - # Run on Tuesdays at Midnight (Monday Nights) - - cron: '0 0 * * 2' +# on: +# schedule: +# # Run on Tuesdays at Midnight (Monday Nights) +# - cron: '0 0 * * 2' +on: push +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: acquia_cleanup: runs-on: ubuntu-latest container: image: pookmish/drupal8ci:php8.3 steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: fail - uses: actions/checkout@v4 - name: Restore Cache uses: actions/cache@v4 @@ -31,7 +42,11 @@ jobs: ACQUIA_KEY: ${{ secrets.ACQUIA_KEY }} ACQUIA_SECRET: ${{ secrets.ACQUIA_SECRET }} run: | + git config --system --add safe.directory '*' && + git config --global user.email "sws-developers@lists.stanford.edu" && + git config --global user.name "Github Actions" && + ssh-keyscan -t rsa svn-23450.prod.hosting.acquia.com >> /root/.ssh/known_hosts && composer install -n && blt blt:telemetry:disable --no-interaction && - blt humsci:clean-backups && + # blt humsci:clean-backups && blt humsci:clean-branches