[Feature] Added docker workflow for image builds (#632)

* added docker workflow, images produced on tag and commit

* added back optics/deployment label to helm chart
buddies-main-deployment
Conner Swann 3 years ago committed by GitHub
parent 19d4724335
commit 4ed85d69f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 46
      .github/workflows/docker.yml
  2. 1
      rust/helm/optics-agent/templates/_helpers.tpl
  3. 4
      rust/helm/optics-agent/values.yaml

@ -0,0 +1,46 @@
name: Push to GCR GitHub Action
on:
push:
branches:
- '**'
tags:
- '**'
# pull_request:
# branches:
# - 'main'
jobs:
build-and-push-to-gcr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
gcr.io/clabs-optics/optics-agent
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
-
name: Login to GCR
uses: docker/login-action@v1
with:
registry: gcr.io
username: _json_key
password: ${{ secrets.GCLOUD_SERVICE_KEY }}
-
name: Build and push
uses: docker/build-push-action@v2
env:
DOCKER_BUILDKIT: 1
with:
context: ./rust
file: ./rust/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

@ -35,6 +35,7 @@ Common labels
*/}} */}}
{{- define "optics-agent.labels" -}} {{- define "optics-agent.labels" -}}
helm.sh/chart: {{ include "optics-agent.chart" . }} helm.sh/chart: {{ include "optics-agent.chart" . }}
optics/deployment: {{ .Values.optics.runEnv | quote }}
{{ include "optics-agent.selectorLabels" . }} {{ include "optics-agent.selectorLabels" . }}
{{- if .Chart.AppVersion }} {{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}

@ -76,7 +76,7 @@ optics:
enabled: false enabled: false
name: "" name: ""
resources: {} resources: {}
# -- Trnsaction Signing keys for home and replica(s) # -- Transaction Signing keys for home and replica(s)
transactionSigners: transactionSigners:
- name: "kovan" - name: "kovan"
hexKey: "" hexKey: ""
@ -88,7 +88,7 @@ optics:
aws: aws:
keyId: "" keyId: ""
region: "" region: ""
# -- Specialized key used by updater and watcher used to sign attestations, separate from updater.keys # -- Specialized key used by updater and watcher used to sign attestations, separate from updater.transactionSigners
attestationSigner: attestationSigner:
hexKey: "" hexKey: ""
aws: aws:

Loading…
Cancel
Save