Skip to content

Commit

Permalink
move release pipeline to main
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Jun 27, 2024
1 parent b7cfc7c commit f2d3b18
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 48 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,28 @@ jobs:

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v2

helm-charts:
# you have to update the `charts/logprep/Chart.yaml` versions to trigger a new release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main

- name: Configure Git
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
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
48 changes: 0 additions & 48 deletions .github/workflows/publish-release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,51 +80,3 @@ jobs:
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.ref_name }}
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-stable
ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-latest
helm-charts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main

- name: Configure Git
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
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: template Chart.yaml
env:
LOGPREP_VERSION: ${{ github.ref_name }}
run: |
sed "s/{{ LOGPREP_VERSION }}/$LOGPREP_VERSION/g" charts/logprep/Chart.yaml.j2 > ./charts/logprep/Chart.yaml
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update Logprep chart versions
branch: main
# Optional glob pattern of files which should be added to the commit
# Defaults to all (.)
# See the `pathspec`-documentation for git
# - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203
# - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec
file_pattern: "charts/logprep/Chart.yaml"

- name: update release tag
uses: rickstaa/action-create-tag@v1
id: "tag_update"
with:
tag: ${{ github.ref_name }}
force_push_tag: true

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit f2d3b18

Please sign in to comment.