diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 78b0dff..47788d4 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -6,6 +6,7 @@ on: permissions: contents: write pull-requests: write + packages: write name: Release @@ -27,20 +28,20 @@ jobs: release-container: runs-on: ubuntu-latest needs: release-please + if: needs.release-please.outputs.release_created env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} + TAG: ${{ needs.release-please.outputs.version }} steps: - run: echo "${{needs.release-please.outputs.version}}" - run: echo "${{needs.release-please.outputs.release_created}}" - uses: actions/checkout@v4 - name: Set up Docker Buildx - if: ${{ needs.release-please.outputs.release_created }} uses: docker/setup-buildx-action@v3 - name: Log in to the Container registry uses: docker/login-action@v3 - if: ${{ needs.release-please.outputs.release_created }} with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -48,9 +49,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v6 - if: ${{ needs.release-please.outputs.release_created }} env: - TAG: ${{ needs.release-please.outputs.version }} with: context: . file: ./Dockerfile @@ -63,21 +62,19 @@ jobs: release-helm: runs-on: ubuntu-latest needs: release-please + if: needs.release-please.outputs.release_created steps: - uses: actions/checkout@v4 - name: Configure Git - if: ${{ needs.release-please.outputs.release_created }} 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 - if: ${{ needs.release-please.outputs.release_created }} env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: Run chart-releaser uses: helm/chart-releaser-action@v1.6.0 - if: ${{ needs.release-please.outputs.release_created }} env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"