Skip to content

doc token

doc token #12

Workflow file for this run

name: Build Image & Chart
on: push
# push:
# branches:
# - main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v2.2.0'
- name: Login Build Sign Push
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${GHR} -u ${{ github.actor }} --password-stdin
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
export DOCKER_BUILDKIT=1
docker build -f Dockerfile -t ${GHR}/${{ github.repository_owner }}:${VERSION} .
docker push ${GHR}/${{ github.repository_owner }}/${IMAGE}/${IMAGE}:${VERSION}
#cosign sign --key env://COSIGN_KEY --tlog-upload=false ${GHR}/${{ github.repository_owner }}/${IMAGE}:${VERSION}
env:
GHR: ghcr.io
IMAGE: entsoe
#COSIGN_KEY: ${{secrets.COSIGN_KEY}}
#COSIGN_PASSWORD: ${{secrets.COSIGN_PASSWORD}}
- name: Helm lint & package & push
run: |
cd chart
helm repo add kepler https://sustainable-computing-io.github.io/kepler-helm-chart
helm registry login ${GHR} -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
helm dependency build
helm lint .
helm package .
helm push $(ls *.tgz| head -1) oci://${GHR}/${{ github.repository_owner }}/charts
env:
GHR: ghcr.io