Skip to content

Commit

Permalink
try out by adding the needs field
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Oct 16, 2024
1 parent ac0fee8 commit dc0709f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 43 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/_container.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Build and publish container
on:
workflow_call:

env:
GCR_IMAGE: ghcr.io/diamondlightsource/blueapi
HELM_VERSION: 3.10.3

jobs:
build:
build_container:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -54,3 +59,35 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

helm_publish:
name: publish gcr
runs-on: ubuntu-latest
environment: prod
needs: build_container
steps:
- name: checkout repo
uses: actions/checkout@v3

- name: install helm
uses: Azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: install

- name: login to acr using helm
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ env.GCR_IMAGE }} --username ${{ github.repository_owner }} --password-stdin
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
- name: package chart and push it
run: |
sed -i "$ a appVersion: ${GITHUB_REF##*/}" helm/blueapi/Chart.yaml
helm dependencies update helm/blueapi
helm package helm/blueapi --version ${GITHUB_REF##*/} -d /tmp/
helm push /tmp/blueapi-${GITHUB_REF##*/}.tgz oci://ghcr.io/diamondlightsource/charts
42 changes: 0 additions & 42 deletions .github/workflows/helm.yml

This file was deleted.

0 comments on commit dc0709f

Please sign in to comment.