From 685cea44e814644b273c2eb9c71926d36ed1cead Mon Sep 17 00:00:00 2001 From: James Rhoat Date: Sun, 10 Nov 2024 07:56:14 -0500 Subject: [PATCH 1/3] adding chart releaser flow --- .github/workflows/oci_releaser.yaml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/oci_releaser.yaml diff --git a/.github/workflows/oci_releaser.yaml b/.github/workflows/oci_releaser.yaml new file mode 100644 index 0000000..1a7a305 --- /dev/null +++ b/.github/workflows/oci_releaser.yaml @@ -0,0 +1,33 @@ +name: OCI Releaser +on: + push: + +jobs: + release: + runs-on: ubuntu-latest + name: "Release Chart OCI to ghcr.io" + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Extract Version from Chart.yaml + id: chart-version + run: | + # Install yq to parse YAML + sudo wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + sudo chmod +x /usr/local/bin/yq + export CHART_VERSION=$(yq '.version' ./charts/factorio-server-charts/Chart.yaml) + echo "chart-version=${CHART_VERSION}" + echo "CHART_VERSION=$CHART_VERSION" >> $GITHUB_ENV + - name: Publish OCI + uses: appany/helm-oci-chart-releaser@v0.4.2 + with: + name: factorio-server-charts + repository: sqljames + tag: $CHART_VERSION + path: charts/factorio-server-charts # Default charts/{name} + registry: ghcr.io + registry_username: ${{ secrets.REGISTRY_USERNAME }} + registry_password: ${{ secrets.REGISTRY_PASSWORD }} + update_dependencies: 'true' # Defaults to false \ No newline at end of file From 6175bf533f38914594cd6a915c6266423e69c58e Mon Sep 17 00:00:00 2001 From: James Rhoat Date: Sun, 10 Nov 2024 07:58:35 -0500 Subject: [PATCH 2/3] adding chart releaser flow --- .github/workflows/oci_releaser.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/oci_releaser.yaml b/.github/workflows/oci_releaser.yaml index 1a7a305..07d8718 100644 --- a/.github/workflows/oci_releaser.yaml +++ b/.github/workflows/oci_releaser.yaml @@ -11,6 +11,11 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: "Set Up Helm" + uses: azure/setup-helm@v3.3 + if: github.ref != 'refs/heads/main' + with: + version: v3.4.1 - name: Extract Version from Chart.yaml id: chart-version run: | From eface5253459ea01ddaa6edee74e07a04d78e580 Mon Sep 17 00:00:00 2001 From: James Rhoat Date: Sun, 10 Nov 2024 08:01:31 -0500 Subject: [PATCH 3/3] adding chart releaser flow --- .github/workflows/oci_releaser.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/oci_releaser.yaml b/.github/workflows/oci_releaser.yaml index 07d8718..b0fe36d 100644 --- a/.github/workflows/oci_releaser.yaml +++ b/.github/workflows/oci_releaser.yaml @@ -33,6 +33,6 @@ jobs: tag: $CHART_VERSION path: charts/factorio-server-charts # Default charts/{name} registry: ghcr.io - registry_username: ${{ secrets.REGISTRY_USERNAME }} - registry_password: ${{ secrets.REGISTRY_PASSWORD }} + registry_username: ${{ github.actor }} + registry_password: ${{ secrets.GITHUB_TOKEN }} update_dependencies: 'true' # Defaults to false \ No newline at end of file