chore(deps): pin dependencies #335
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create Release | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| create_release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| outputs: | |
| new_tag: ${{ steps.tag_version.outputs.new_tag }} | |
| changelog: ${{ steps.tag_version.outputs.changelog }} | |
| steps: | |
| - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | |
| - name: Bump version and push tag | |
| id: tag_version | |
| uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2 | |
| with: | |
| # use this PAT to have other workflows triggered | |
| github_token: ${{ secrets.GH_RELEASE_PAT }} | |
| dry_run: ${{ github.event_name == 'pull_request' }} | |
| - name: Create a GitHub release | |
| uses: ncipollo/release-action@1c89adf39833729d8f85a31ccbc451b078733c80 # v1 | |
| if: ${{ github.event_name != 'pull_request' }} | |
| with: | |
| tag: ${{ steps.tag_version.outputs.new_tag }} | |
| name: Release ${{ steps.tag_version.outputs.new_tag }} | |
| body: ${{ steps.tag_version.outputs.changelog }} | |
| - name: Output generated version information | |
| run: | | |
| { echo "# Tag ${{ steps.tag_version.outputs.new_tag }}" | |
| echo "" | |
| echo "## Release Notes" | |
| echo "${{ steps.tag_version.outputs.changelog }}" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| update_helm_chart: | |
| runs-on: ubuntu-latest | |
| needs: create_release | |
| if: ${{ github.event_name != 'pull_request' }} | |
| steps: | |
| - name: Strip leading "v" from version | |
| id: strip_version | |
| run: | | |
| # shellcheck disable=SC2016 | |
| echo "STRIP_VERSION=$(php -r 'echo (str_starts_with($argv[1], "v") ? substr($argv[1], 1) : $argv[1]);' ${{ needs.create_release.outputs.new_tag }})" >> "$GITHUB_OUTPUT" | |
| - name: Update Helm chart | |
| uses: shini4i/helm-charts-updater@f4854b054b83fac648681aa2db26cfe9c2f3529e # v1 | |
| with: | |
| github_token: ${{ secrets.CHARTS_REPO_TOKEN }} | |
| gh_user: jeboehm | |
| gh_repo: mailserver-charts | |
| chart_name: docker-mailserver | |
| app_version: ${{ steps.strip_version.outputs.STRIP_VERSION }} | |
| generate_docs: true | |
| update_readme: true |