diff --git a/.github/workflows/update-server.yml b/.github/workflows/update-server.yml index d9a3b30..1c84e42 100644 --- a/.github/workflows/update-server.yml +++ b/.github/workflows/update-server.yml @@ -2,7 +2,25 @@ name: update neo with compose files run-name: update on ${{ github.sha }} on: [push] 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 steps: - name: setup ssh @@ -32,4 +50,4 @@ jobs: run: ssh staging srvctl -fn neo mm e - name: send ping to ntfy 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 }}" \ No newline at end of file + 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 }}"