Skip to content

Commit

Permalink
fix: cleanup workflow, fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Oct 14, 2024
1 parent 8efa5a8 commit 8deb3f0
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
permissions:
contents: write
pull-requests: write
packages: write

name: Release

Expand All @@ -27,30 +28,28 @@ 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 }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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
Expand All @@ -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 "[email protected]"
- 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/[email protected]
if: ${{ needs.release-please.outputs.release_created }}
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 8deb3f0

Please sign in to comment.