Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

jobs:
build-and-push:
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@feat/docker-run-network
uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@main
with:
docker-file: Dockerfile
image-name: ghcr.io/ls1intum/theia/garbage-collector
image-name: ghcr.io/eduide/garbage-collector
docker-context: .
tags: "2024-12-02"
tags: "latest,${{ github.sha }}"
network: "host"
secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
35 changes: 24 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ on:
- main
paths:
- "helm/**"
- ".github/workflows/release.yml"
workflow_dispatch:

permissions:
contents: write
pages: write
packages: write

jobs:
release:
Expand All @@ -21,17 +22,29 @@ jobs:
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Install Helm
uses: azure/setup-helm@v4

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
- name: Set registry owner
run: echo "REGISTRY_OWNER=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Login to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Extract chart version
id: chart
run: |
VERSION=$(grep '^version:' helm/Chart.yaml | awk '{print $2}')
echo "version=${VERSION}" >> $GITHUB_OUTPUT

- name: Package and push to OCI
run: |
helm package ./helm
helm push theia-workspace-garbage-collector-${{ steps.chart.outputs.version }}.tgz oci://ghcr.io/${{ env.REGISTRY_OWNER }}/charts

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
charts_dir: .
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
tag_name: theia-workspace-garbage-collector-${{ steps.chart.outputs.version }}
name: theia-workspace-garbage-collector ${{ steps.chart.outputs.version }}
generate_release_notes: true
2 changes: 1 addition & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
replicaCount: 1
image:
repository: ghcr.io/ghcr.io/ls1intum/theia/garbage-collector
repository: ghcr.io/eduide/garbage-collector
tag: latest
pullPolicy: Always

Expand Down