Create build.yaml
This commit is contained in:
parent
13dac962f1
commit
43e0e7c60f
23
build.yaml
Normal file
23
build.yaml
Normal file
@ -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"
|
Loading…
x
Reference in New Issue
Block a user