Skip to content

Commit

Permalink
Merge pull request #22 from BananaOps/ci/update-workflow-release
Browse files Browse the repository at this point in the history
ci: update release workflow
  • Loading branch information
jplanckeel authored Oct 4, 2024
2 parents 9a003f4 + 5016b65 commit a8084e7
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
sed -i '/^version:/c\version: ${{steps.version_tag.outputs.tag}}' ./helm/tracker/Chart.yaml
sed -i '/^appVersion:/c\appVersion: "${{steps.version_tag.outputs.tag}}"' ./helm/tracker/Chart.yaml
- if: steps.tag.outputs.value != ''
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "ci: bump charts to ${{steps.version_tag.outputs.tag}}"

Expand All @@ -63,7 +63,7 @@ jobs:
- uses: actions/setup-go@v5
if: "steps.tag.outputs.value != ''"
with:
go-version: '>=1.18.0'
go-version: stable

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -72,27 +72,17 @@ jobs:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{ secrets.DOCKER_AUTH_TOKEN }}

- uses: imjasonh/setup-ko@v0.6
- uses: imjasonh/setup-ko@v0.7

- name: Build and Push on Docker Hub
if: "steps.tag.outputs.value != ''"
env:
KO_DOCKER_REPO: bananaops/tracker
run: ko publish . --bare --tags latest,${{steps.version_tag.outputs.tag}}

- name: Run GoReleaser
if: "steps.tag.outputs.value != ''"
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: ${{steps.version_tag.outputs.tag}}
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ko publish ./cmd --bare --tags latest,${{steps.version_tag.outputs.tag}}

release-helm:
needs: [release]
if: startsWith(github.ref, 'refs/tags/v')
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
Expand All @@ -106,12 +96,12 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
uses: helm/chart-releaser-action@v1
with:
charts_dir: helm
env:
Expand Down

0 comments on commit a8084e7

Please sign in to comment.