Publish Docker image to Gitea registry
All checks were successful
build-website / build (push) Successful in 1m45s
All checks were successful
build-website / build (push) Successful in 1m45s
This commit is contained in:
@@ -28,6 +28,23 @@ jobs:
|
|||||||
run: npm run build
|
run: npm run build
|
||||||
working-directory: apps/website
|
working-directory: apps/website
|
||||||
|
|
||||||
|
- name: Install Docker CLI
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y docker.io
|
||||||
|
|
||||||
|
- name: Log in to registry
|
||||||
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login code.harborsmith.co -u matt --password-stdin
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
|
env:
|
||||||
|
IMAGE: code.harborsmith.co/matt/website
|
||||||
|
run: |
|
||||||
|
docker build -f apps/website/Dockerfile.prod -t $IMAGE:${{ github.sha }} apps/website
|
||||||
|
docker push $IMAGE:${{ github.sha }}
|
||||||
|
docker tag $IMAGE:${{ github.sha }} $IMAGE:latest
|
||||||
|
docker push $IMAGE:latest
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
2
apps/website/Dockerfile.prod
Normal file
2
apps/website/Dockerfile.prod
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
FROM nginx:1.27-alpine
|
||||||
|
COPY .output/public /usr/share/nginx/html
|
||||||
Reference in New Issue
Block a user