build container image in pipeline
This commit is contained in:
parent
779b890d36
commit
63016c1dd8
2 changed files with 37 additions and 1 deletions
|
|
@ -30,6 +30,37 @@ jobs:
|
||||||
- name: Upload site artifact
|
- name: Upload site artifact
|
||||||
uses: forgejo/upload-artifact@v4
|
uses: forgejo/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: docs
|
name: docs.zip
|
||||||
path: site/
|
path: site/
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Download site artifact
|
||||||
|
uses: forgejo/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: docs.zip
|
||||||
|
path: site/
|
||||||
|
|
||||||
|
- name: Log in to Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ vars.CONTAINER_REGISTRY }}
|
||||||
|
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ vars.CONTAINER_REGISTRY }}/servala/documentation:latest
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|
|
||||||
5
Dockerfile
Normal file
5
Dockerfile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
FROM docker.io/caddy:latest
|
||||||
|
|
||||||
|
COPY site/ /usr/share/caddy/
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
Loading…
Add table
Add a link
Reference in a new issue