diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..be78ebe --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.github +.gitignore +config.yaml.example +renovate.json +LICENSE +README.md \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e87aace..d870e7d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -56,15 +56,8 @@ jobs: - name: Extract version from tag id: version run: | - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - # Use the manually provided tag input - TAG="${{ github.event.inputs.tag }}" - VERSION="${TAG#v}" - else - # Extract from GITHUB_REF for tag pushes - TAG="${GITHUB_REF#refs/tags/}" - VERSION="${TAG#v}" - fi + TAG="${GITHUB_REF#refs/tags/}" + VERSION="${TAG#v}" echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Update Chart.yaml with release version @@ -99,19 +92,18 @@ jobs: helm package chart --version ${{ steps.version.outputs.version }} --app-version ${{ steps.version.outputs.version }} - name: Create GitHub Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v1 + if: github.ref_type == 'tag' with: files: | flux-extension-controller-${{ steps.version.outputs.version }}.tgz generate_release_notes: true - make_latest: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-helm-chart: runs-on: ubuntu-latest needs: release - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') permissions: contents: read packages: write @@ -128,15 +120,9 @@ jobs: - name: Extract version from tag id: version run: | - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - # Use the manually provided tag input - TAG="${{ github.event.inputs.tag }}" - VERSION="${TAG#v}" - else - # Extract from GITHUB_REF for tag pushes - TAG="${GITHUB_REF#refs/tags/}" - VERSION="${TAG#v}" - fi + # Extract from GITHUB_REF for tag pushes + TAG="${GITHUB_REF#refs/tags/}" + VERSION="${TAG#v}" echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Update Chart.yaml with release version @@ -159,4 +145,4 @@ jobs: - name: Package and push Helm chart to OCI registry run: | helm package chart --version ${{ steps.version.outputs.version }} --app-version ${{ steps.version.outputs.version }} - helm push flux-extension-controller-${{ steps.version.outputs.version }}.tgz oci://${{ env.registry }}/${{ steps.image_name.outputs.name }}-chart + helm push flux-extension-controller-${{ steps.version.outputs.version }}.tgz oci://${{ env.registry }}/charts/ diff --git a/.gitignore b/.gitignore index fdbe97e..6a49923 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,3 @@ config.yaml # Coverage files cover.out coverage.txt - -# Docker build context -.dockerignore