diff --git a/.github/workflows/DrainpipeDev.yml b/.github/workflows/DrainpipeDev.yml index 63703d6b..494176d7 100644 --- a/.github/workflows/DrainpipeDev.yml +++ b/.github/workflows/DrainpipeDev.yml @@ -3,7 +3,7 @@ name: Push Drainpipe Dev Package on: push: branches: - - main + - '**' tags: - 'v*' diff --git a/.github/workflows/DrainpipeDevClean.yml b/.github/workflows/DrainpipeDevClean.yml new file mode 100644 index 00000000..87472c34 --- /dev/null +++ b/.github/workflows/DrainpipeDevClean.yml @@ -0,0 +1,42 @@ +name: Clean Drainpipe Dev Package + +on: + on: delete + +concurrency: + group: drainpipe-dev + cancel-in-progress: false + +permissions: + contents: read + +jobs: + Drainpipe-Dev-Clean: + name: Push branch to drainpipe-dev + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Add drainpipe-dev deploy key in order to run git clone + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.DRAINPIPE_DEV_DEPLOY_KEY }} + log-public-key: false + + # Commits made by the https://github.com/apps/lullabot-drainpipe application. + # @see https://github.com/orgs/community/discussions/24664 + - name: Create git checkout of drainpipe-dev + working-directory: drainpipe-dev + run: | + git init + git branch -m ${{ github.ref_name }} + git remote add origin git@github.com:Lullabot/drainpipe-dev.git + git fetch origin + git reset --mixed origin/${{ github.ref_name }} + git config user.name "Lullabot-Drainpipe[bot]" + git config user.email "157769597+Lullabot-Drainpipe[bot]@users.noreply.github.com" + + - name: Delete ref from drainpipe-dev + working-directory: drainpipe-dev + run: | + git push origin --delete ${{ github.ref_name }}