Skip to content

Dockerfile: Fix formatting #9

Dockerfile: Fix formatting

Dockerfile: Fix formatting #9

# (C) Copyright Confidential Containers Contributors 2022.
# SPDX-License-Identifier: Apache-2.0
#
# Build and push the webhook image if any webhook source files changed.
---
name: webhook-build-push
on:
push:
branches:
- main
paths:
- 'webhook/**'
jobs:
build_push_webhook:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webhook
steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Read properties from versions.yaml
run: |
go_version="$(yq '.tools.golang' versions.yaml)"
[ -n "$go_version" ]
echo "GO_VERSION=${go_version}" >> "$GITHUB_ENV"
- name: Setup Golang version ${{ env.GO_VERSION }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to quay Container Registry
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push image
run: |
make docker-load docker-push IMG=quay.io/confidential-containers/peer-pods-webhook:${{ github.sha }}
make docker-push IMG=quay.io/confidential-containers/peer-pods-webhook:latest