.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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy_script:
|
deploy:
|
||||||
runs-on: linux_amd64
|
runs-on: linux_amd64
|
||||||
steps:
|
steps:
|
||||||
- name: Apply zone changes
|
- name: Apply zone changes
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
LAST_RUN=$(cat /home/runner/last_run)
|
||||||
CURRENT_ZONE=
|
CURRENT_ZONE=
|
||||||
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
echo "Preparing to update ${{ vars.DNS_SERVER }}..."
|
||||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns
|
git clone ${{ gitea.server_url }}/${{ gitea.repository }} dns
|
||||||
cd 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
|
echo "${{ secrets.TSIG_KEY }}" | base64 -d > temp_keyfile
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
|
@ -48,3 +50,4 @@ jobs:
|
||||||
esac
|
esac
|
||||||
done < zone_diff.txt
|
done < zone_diff.txt
|
||||||
rm temp_keyfile
|
rm temp_keyfile
|
||||||
|
echo ${{ env.GITHUB_SHA }} > /home/runner/last_run
|
Loading…
Reference in New Issue