forked from kamba4/sunders
feat: Adds CI/CD steps to build and push web
container
This commit is contained in:
parent
9af7ddc4e2
commit
93f4ce6145
1 changed files with 37 additions and 0 deletions
37
.forgejo/workflows/images.yml
Normal file
37
.forgejo/workflows/images.yml
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Build Hello World Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.hamburg.ccc.de
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push web image to Container Registry
|
||||
run: |
|
||||
docker build -t web:latest .
|
||||
docker tag web:latest git.hamburg.ccc.de/ccchh/sunders/web:latest
|
||||
docker push git.hamburg.ccc.de/ccchh/sunders/web:latest
|
||||
working-directory: ./
|
||||
|
||||
- name: Start Docker Compose services
|
||||
run: |
|
||||
docker compose up -d --wait
|
||||
docker compose down
|
||||
working-directory: /
|
Loading…
Add table
Add a link
Reference in a new issue