Skip to content

change serving repo

change serving repo #9

Workflow file for this run

name: Build and publish a Docker image
on:
push:
branches:
- "main"
tags: [ '*' ]
# - 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches: [ main ]
jobs:
build:
name: Build & push docker image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./example-1-sidecars/Dockerfile
image: ghcr.io/Liquid-Reply/k8s-spin/spin-static-server
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Debug
run: |
echo "github.ref -> {{ github.ref }}"
- # Login into registry
name: Login to GitHub Container Registry
# if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- # Extract Docker metadata
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- # Build and push to GHCR Registry
name: Build and push Docker image
uses: docker/build-push-action@v5
with:
# context: .
push: ${{ github.event_name != 'pull_request' }}
file: ${{ matrix.dockerfile }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
# ghcr.io/${{ env.IMAGE_NAME }}:latest
# ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }}
# ${{ steps.meta.outputs.tags }}