New chart release #86
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: New chart release | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: "Rocket.Chat tag to use for the release (default current app version)" | ||
| required: false | ||
| chartVersion: | ||
| description: "Chart version to use for the release (default patch increment)" | ||
| required: false | ||
| chartName: | ||
| required: false | ||
| type: choice | ||
| options: | ||
| - rocketchat | ||
| - monitoring | ||
| - rocketchat-voip | ||
| jobs: | ||
| config: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| chart-version: ${{ steps.set.outputs.chart-version }} | ||
| tag: ${{ steps.set.outputs.tag }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - shell: bash | ||
| id: set | ||
| run: | | ||
| tag="${{inputs.tag}}" | ||
| [[ -n "$tag" ]] || tag="$(awk '/^appVersion:/ {print $2}' ${{ inputs.chartName }}/Chart.yaml)" | ||
| echo "tag=$tag" >>$GITHUB_OUTPUT | ||
| echo "tag=$tag" | ||
| chart_version="${{ inputs.chartVersion }}" | ||
| if [[ -z "$chart_version" ]]; then | ||
| chart_version="$(awk '/^version:/ {print $2}' ${{ inputs.chartName }}/Chart.yaml)" | ||
| chart_version="$(echo -n "$chart_version" | awk -F. '{print $1"."$2"."$3+1}')" | ||
| fi | ||
| echo "chart-version=$chart_version" | ||
| echo "chart-version=$chart_version" >>$GITHUB_OUTPUT | ||
| run: | ||
| needs: | ||
| - config | ||
| uses: ./.github/workflows/main.yml | ||
|
Check warning on line 49 in .github/workflows/new-release.yml
|
||
| with: | ||
| tag: ${{ needs.config.outputs.tag }} | ||
| chartVersion: ${{ needs.config.outputs.chart-version }} | ||
| chartName: ${{ inputs.chartName }} | ||
| secrets: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| docker-username: ${{ secrets.DOCKER_USERNAME }} | ||
| docker-password: ${{ secrets.DOCKER_PASSWORD }} | ||