validate entry
This commit is contained in:
parent
0927fb6c5a
commit
e78c791c35
1 changed files with 20 additions and 2 deletions
22
.github/workflows/update-server.yml
vendored
22
.github/workflows/update-server.yml
vendored
|
@ -2,7 +2,25 @@ name: update neo with compose files
|
||||||
run-name: update on ${{ github.sha }}
|
run-name: update on ${{ github.sha }}
|
||||||
on: [push]
|
on: [push]
|
||||||
jobs:
|
jobs:
|
||||||
update:
|
validate:
|
||||||
|
name: validate the new configuration
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: install packages
|
||||||
|
run: |
|
||||||
|
apt update -y
|
||||||
|
apt install -y docker-compose
|
||||||
|
- name: validate files
|
||||||
|
run: |
|
||||||
|
DC_ARGS=""
|
||||||
|
for file in docker-compose.*.yml; do
|
||||||
|
DC_ARGS="-f $file "
|
||||||
|
done
|
||||||
|
docker-compose $DC_ARGS config -q
|
||||||
|
deploy:
|
||||||
|
name: deploy the config on the server
|
||||||
|
needs: [validate]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: setup ssh
|
- name: setup ssh
|
||||||
|
@ -32,4 +50,4 @@ jobs:
|
||||||
run: ssh staging srvctl -fn neo mm e
|
run: ssh staging srvctl -fn neo mm e
|
||||||
- name: send ping to ntfy
|
- name: send ping to ntfy
|
||||||
if: always()
|
if: always()
|
||||||
run: "curl -d '${{ job.status }}: ${{ github.sha }}\n https://git.ixvd.net/${{ github.repository }}/actions/runs/${{ github.run_number }}' https://push.ixvd.net/${{ secrets.NTFY_TOPIC }}"
|
run: "curl -d '${{ job.status }}: ${{ github.sha }}\n https://git.ixvd.net/${{ github.repository }}/actions/runs/${{ github.run_number }}' https://push.ixvd.net/${{ secrets.NTFY_TOPIC }}"
|
||||||
|
|
Reference in a new issue