From 43e0e7c60f0dee8da54b5742403a68e9c2389525 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 25 Aug 2023 19:04:42 +0100 Subject: [PATCH] Create build.yaml --- build.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 build.yaml diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..e2021f1 --- /dev/null +++ b/build.yaml @@ -0,0 +1,23 @@ +name: Build and push image + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: self-hosted + defaults: + run: + working-directory: /repo + steps: + - name: Set git remote if not already set + run: git remote -v | grep -w gitea || git remote add gitea "./gitea/git/repositories/${GITHUB_REPOSITORY,,}.git" + - name: Checkout repo + run: git pull gitea main + + - name: Deploy + run: | + echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u thatguyjack --password-stdin + docker build -t tgj.services/git/php-fpm:latest . + docker push tgj.services/git/php-fpm:latestversion: "3.8" \ No newline at end of file