add ci
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 18s
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 18s
This commit is contained in:
parent
7d4df39457
commit
b79281d857
37
.gitea/workflows/docker-build.yml
Normal file
37
.gitea/workflows/docker-build.yml
Normal file
@ -0,0 +1,37 @@
|
||||
name: Build and Push Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Build and Push Docker Images
|
||||
runs-on: builder
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build Docker images
|
||||
working-directory: .build/prod
|
||||
run: docker compose build
|
||||
|
||||
- name: Login to Docker Registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ vars.DOCKER_REGISTRY_URL }}
|
||||
username: ${{ vars.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Push Docker images
|
||||
if: github.event_name != 'pull_request'
|
||||
working-directory: .build/prod
|
||||
run: docker compose push
|
Loading…
x
Reference in New Issue
Block a user