.forgejo/workflows/ci.yaml: adaptation to auto cancel
DNS automated deployment / deploy (push) Successful in 2s
Details
DNS automated deployment / deploy (push) Successful in 2s
Details
This commit is contained in:
parent
2980b3599a
commit
0acc17edee
|
@ -1,20 +1,22 @@
|
|||
name: DNS automated deployment
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
deploy_script:
|
||||
deploy:
|
||||
runs-on: linux_amd64
|
||||
steps:
|
||||
- name: Apply zone changes
|
||||
shell: bash
|
||||
run: |
|
||||
LAST_RUN=$(cat /home/runner/last_run)
|
||||
CURRENT_ZONE=
|
||||
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns
|
||||
cd dns
|
||||
git diff HEAD^ HEAD > zone_diff.txt
|
||||
git diff $LAST_RUN ${{ env.GITHUB_SHA }} > zone_diff.txt
|
||||
echo "${{ secrets.TSIG_KEY }}" | base64 -d > temp_keyfile
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
|
@ -48,3 +50,4 @@ jobs:
|
|||
esac
|
||||
done < zone_diff.txt
|
||||
rm temp_keyfile
|
||||
echo ${{ env.GITHUB_SHA }} > /home/runner/last_run
|
Loading…
Reference in New Issue