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