From 4577da3bd5bbf740ccb81d2ef40937495fb4e9c8 Mon Sep 17 00:00:00 2001 From: Caleb Woodbine Date: Thu, 12 Oct 2023 10:37:42 +1300 Subject: [PATCH] feat: add image build build the container image --- .conform.yaml | 37 ------------------------ .github/workflows/build.yml | 36 +++++++++++++++++++++++ .github/workflows/policy-conformance.yml | 13 +++++++++ 3 files changed, 49 insertions(+), 37 deletions(-) delete mode 100644 .conform.yaml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/policy-conformance.yml diff --git a/.conform.yaml b/.conform.yaml deleted file mode 100644 index 2e270b3b..00000000 --- a/.conform.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. -# -# Generated on 2022-09-19T19:55:11Z by kres 255fc05. - ---- -policies: -- type: commit - spec: - dco: true - gpg: - required: true - identity: - gitHubOrganization: siderolabs - spellcheck: - locale: US - maximumOfOneCommit: true - header: - length: 89 - imperative: true - case: lower - invalidLastCharacters: . - body: - required: true - conventional: - types: ["chore","docs","perf","refactor","style","test","release"] - scopes: [".*"] -- type: license - spec: - skipPaths: - - .git/ - - testdata/ - includeSuffixes: - - .go - excludeSuffixes: - - .pb.go - - .pb.gw.go - header: "// This Source Code Form is subject to the terms of the Mozilla Public\u000A// License, v. 2.0. If a copy of the MPL was not distributed with this\u000A// file, You can obtain one at http://mozilla.org/MPL/2.0/.\u000A" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..a6382731 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: build +on: + push: + branches: + - main + pull_request: {} + workflow_dispatch: {} +permissions: + packages: write + id-token: write +jobs: + build: + uses: GeoNet/Actions/.github/workflows/reusable-docker-build.yml@main + with: + context: . + dockerfile: ./Dockerfile + imageName: conform + platforms: linux/amd64 + push: ${{ github.ref == 'refs/heads/main' }} + target: image-conform + buildArgs: | + TOOLCHAIN=ghcr.io/geonet/base-images/go:1.20 + GOLANGCILINT_VERSION=v1.49.0 + GOFUMPT_VERSION=v0.3.1 + GO_VERSION=1.19 + GOIMPORTS_VERSION=v0.1.12 + PROTOBUF_GO_VERSION=1.28.1 + GRPC_GO_VERSION=1.2.0 + GRPC_GATEWAY_VERSION=2.11.3 + VTPROTOBUF_VERSION=0.3.0 + DEEPCOPY_VERSION=v0.5.5 + TESTPKGS=./... + KRES_IMAGE=ghcr.io/siderolabs/kres:latest + SHA=${{ github.sha }} + TAG=${{ github.event.release.tag_name }} + VERSION_PKG=github.com/siderolabs/conform/internal/version diff --git a/.github/workflows/policy-conformance.yml b/.github/workflows/policy-conformance.yml new file mode 100644 index 00000000..d884cd5e --- /dev/null +++ b/.github/workflows/policy-conformance.yml @@ -0,0 +1,13 @@ +name: policy conformance +on: + pull_request: + branches: + - main +permissions: + statuses: write + checks: write + contents: read + pull-requests: read +jobs: + conform: + uses: GeoNet/Actions/.github/workflows/reusable-policy-conformance.yml@main