Some checks failed
Build and Deploy hatch.surf / build (push) Failing after 27s
- Removed SSH deploy step (needs secrets configuration) - Build Docker image and save locally - Can add deployment step later with proper secrets Co-Authored-By: Paperclip <noreply@paperclip.ing>
34 lines
883 B
YAML
34 lines
883 B
YAML
name: Build and Deploy hatch.surf
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
IMAGE_NAME: hatch-web
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
docker build -t ${{ env.IMAGE_NAME }}:${{ github.sha }} .
|
|
docker tag ${{ env.IMAGE_NAME }}:${{ github.sha }} ${{ env.IMAGE_NAME }}:latest
|
|
echo "Docker image built successfully"
|
|
docker images | grep ${{ env.IMAGE_NAME }}
|
|
|
|
- name: Save Docker image
|
|
run: |
|
|
docker save ${{ env.IMAGE_NAME }}:latest | gzip > /tmp/${{ env.IMAGE_NAME }}.tar.gz
|
|
echo "Image saved to /tmp/${{ env.IMAGE_NAME }}.tar.gz"
|
|
ls -lh /tmp/${{ env.IMAGE_NAME }}.tar.gz
|