From cb973faa02c79224f7f9089cd1717de6085d2d08 Mon Sep 17 00:00:00 2001 From: ZoutigeWolf Date: Fri, 25 Oct 2024 13:32:45 +0200 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..6a0bc5e --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,36 @@ +name: Deploy Docker + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Docker login + uses: docker/login-action@v3 + with: + registry: ${{ secrets.REGISTRY_URL }} + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Build and push to local registry + uses: docker/build-push-action@v6 + with: + push: true + tags: ${{ secrets.REGISTRY_URL }}/ov-tracker-api:latest + + - name: Restart docker container + uses: JamesIves/fetch-api-data-action@v2 + with: + endpoint: ${{ secrets.RESTART_URL }} + configuration: | + { + "method": "POST" + }