22 lines
636 B
YAML
22 lines
636 B
YAML
name: Build and push image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
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" |