feat(cicd): add release.yml
This commit is contained in:
parent
9683d28d68
commit
191baaa204
24
.gitea/workflows/release.yml
Normal file
24
.gitea/workflows/release.yml
Normal file
@ -0,0 +1,24 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Build the Docker Image
|
||||
run: |
|
||||
docker build \
|
||||
-t sprout-db-migrations:latest \
|
||||
-t sprout-db-migrations:$(git rev-parse --short) \
|
||||
-f Dockerfile \
|
||||
.
|
||||
|
||||
- name: Login to Container Registry
|
||||
run: echo "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin ${{ secrets.DOCKER_REGISTRY }}
|
||||
|
||||
- name: Push the Docker Image
|
||||
run: docker push ${{ secrets.DOCKER_REGISTRY }}/sprout-db-migrations:$(git rev-parse --short)
|
||||
Loading…
Reference in New Issue
Block a user