This commit is contained in:
36
.gitea/workflows/deploy.yml
Normal file
36
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
REGISTRY: git.bga.sh
|
||||
IMAGE: ${{ github.repository_owner }}/vat-api.eu
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build & Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
LATEST="${{ env.REGISTRY }}/${{ github.repository_owner }}/vat-api.eu:latest"
|
||||
docker build -t "$LATEST" .
|
||||
docker push "$LATEST"
|
||||
|
||||
- name: Trigger deployment
|
||||
run: |
|
||||
echo "TODO: Add webhook URL"
|
||||
# curl -X POST "<WEBHOOK_URL>"
|
||||
Reference in New Issue
Block a user