Automatically deploy pull requests for testing #8

Merged
erth9960 merged 44 commits from actions into master 2024-07-08 14:29:41 +02:00
2 changed files with 9 additions and 5 deletions
Showing only changes of commit 09332980d9 - Show all commits

View File

@ -13,7 +13,9 @@ jobs:
MANGLED_BRANCH_NAME="$(echo ${{ gitea.headref}} | sed -r -e 's%/%-%g' -e 's/[^0-9a-z\-]//g')"
echo $MANGLED_BRANCH_NAME
echo "MANGLED_NAME=$MANGLED_BRANCH_NAME" >> "$GITHUB_OUTPUT"
- run: |
- name: Set up SSH key
run: |
echo "${{ secrets.BRANCH_CLEANUP_KEY }}" >> ssh_key
chmod 0600 ssh_key
- run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.headref }} ${{ steps.mangled-name.outputs.MANGLED_NAME }}" | ssh -o StrictHostKeyChecking=accept-new -i ssh_key branch.dsv.su.se
- name: Execute clean up script
run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.headref }} ${{ steps.mangled-name.outputs.MANGLED_NAME }}" | ssh -o StrictHostKeyChecking=accept-new -i ssh_key branch.dsv.su.se

View File

@ -15,11 +15,13 @@ jobs:
MANGLED_BRANCH_NAME="$(echo ${{ gitea.headref}} | sed -r -e 's%/%-%g' -e 's/[^0-9a-z\-]//g')"
echo $MANGLED_BRANCH_NAME
echo "MANGLED_NAME=$MANGLED_BRANCH_NAME" >> "$GITHUB_OUTPUT"
- run: |
- name: Set up SSH key
run: |
echo "${{ secrets.BRANCH_DEPLOY_KEY }}" >> ssh_key
chmod 0600 ssh_key
- run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.headref }} ${{ steps.mangled-name.outputs.MANGLED_NAME }}" | ssh -o StrictHostKeyChecking=accept-new -i ssh_key branch.dsv.su.se
- name: View context attributes
- name: Execute deploy script
run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.headref }} ${{ steps.mangled-name.outputs.MANGLED_NAME }}" | ssh -o StrictHostKeyChecking=accept-new -i ssh_key branch.dsv.su.se
- name: Post URL to deployment as comment
uses: actions/github-script@v7
env:
MANGLED_BRANCH_NAME: ${{ steps.mangled-name.outputs.MANGLED_NAME }}