Skip to content

send webserver logs to stdout #84

send webserver logs to stdout

send webserver logs to stdout #84

name: 'Build and push container image'
on:
push:
branches:
- 'master'
- 'k8s'
jobs:
build-and-push:
name: 'Build and push container image'
runs-on: ubuntu-latest
# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEV_SA_KEY }}
project_id: ${{ secrets.SV_PROJ_NAME }}
export_default_credentials: true
# Configure Docker to use the gcloud command-line tool as a credential helper for authentication
- run: gcloud --quiet auth configure-docker us-central1-docker.pkg.dev
- name: Docker meta
id: meta # you'll use this in the next step
uses: docker/metadata-action@v3
with:
images: |
us-central1-docker.pkg.dev/skyviewer/public-images/craft-base-image
flavor: |
latest=true
prefix=
suffix=
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}