From 2d6af209e9c05ead645d20b412dc18359ad793d3 Mon Sep 17 00:00:00 2001 From: engel80 Date: Sun, 18 Dec 2022 18:54:14 +0900 Subject: [PATCH] add-docker-build-action (#4) --- .github/workflows/build.yml | 10 ++++++++-- README.md | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bda9ba..87dcd09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,8 +7,14 @@ on: pull_request: types: [opened, synchronize, reopened] jobs: - build: - name: Build + docker-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build the Docker image + run: cd app && docker build . -t python-ping-api:$(date +%s) + sonarqube: + name: Sonarqube runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 500bc57..7378d96 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python sample project for GKE -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DevSecOpsSamples_gke-python-api&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=DevSecOpsSamples_gke-python-api) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=DevSecOpsSamples_gke-python-api&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=DevSecOpsSamples_gke-python-api) +[![Build](https://github.com/DevSecOpsSamples/gke-python-api/actions/workflows/build.yml/badge.svg)](https://github.com/DevSecOpsSamples/gke-python-api/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DevSecOpsSamples_gke-python-api&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=DevSecOpsSamples_gke-python-api) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=DevSecOpsSamples_gke-python-api&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=DevSecOpsSamples_gke-python-api) The sample project to deploy Python REST API application, Service, HorizontalPodAutoscaler, Ingress, and BackendConfig on GKE.