Add .gitea/workflows/docker-build.yaml
Some checks failed
Build & Push Football Docker Images / build-push-update (push) Failing after 4s
Some checks failed
Build & Push Football Docker Images / build-push-update (push) Failing after 4s
This commit is contained in:
45
.gitea/workflows/docker-build.yaml
Normal file
45
.gitea/workflows/docker-build.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# .gitea/workflows/docker-build.yaml
|
||||||
|
name: Build & Push Football Docker Images
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'scraper/**'
|
||||||
|
- 'api/**'
|
||||||
|
- '.gitea/workflows/docker-build.yaml'
|
||||||
|
workflow_dispatch: # allows manual trigger from Gitea UI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-push-update:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Login to Gitea Registry
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.h0melab.uk \
|
||||||
|
-u "${{ secrets.REGISTRY_USERNAME }}" \
|
||||||
|
--password-stdin
|
||||||
|
|
||||||
|
- name: Build & Push Scraper
|
||||||
|
run: |
|
||||||
|
docker build \
|
||||||
|
-t git.h0melab.uk/rgcosta7/football-scraper:latest \
|
||||||
|
-t git.h0melab.uk/rgcosta7/football-scraper:${{ gitea.sha }} \
|
||||||
|
./scraper/
|
||||||
|
docker push git.h0melab.uk/rgcosta7/football-scraper:latest
|
||||||
|
docker push git.h0melab.uk/rgcosta7/football-scraper:${{ gitea.sha }}
|
||||||
|
|
||||||
|
- name: Build & Push API
|
||||||
|
run: |
|
||||||
|
docker build \
|
||||||
|
-t git.h0melab.uk/rgcosta7/football-api:latest \
|
||||||
|
-t git.h0melab.uk/rgcosta7/football-api:${{ gitea.sha }} \
|
||||||
|
./api/
|
||||||
|
docker push git.h0melab.uk/rgcosta7/football-api:latest
|
||||||
|
docker push git.h0melab.uk/rgcosta7/football-api:${{ gitea.sha }}
|
||||||
Reference in New Issue
Block a user