Workflow file for this run
This file contains 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 CARTO SelfHosted official release" | |
on: | |
release: | |
types: [prereleased, released] | |
jobs: | |
helm-package: | |
timeout-minutes: 3 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Obtain release info | |
id: release-info | |
run: | | |
if [ "${{ github.event.action }}" == "prereleased" ]; then | |
yq -i '.version = .version + "-beta"' chart/Chart.yaml | |
yq -i '.spec.chart.chartVersion = .spec.chart.chartVersion + "-beta"' manifests/kots-helm.yaml | |
echo "channel-name=Release candidates" >> "$GITHUB_OUTPUT" | |
echo "version=$(yq .version -r chart/Chart.yaml)" >> "$GITHUB_OUTPUT" | |
else | |
echo "channel-name=Stable" >> "$GITHUB_OUTPUT" | |
echo "version=$(yq .version -r chart/Chart.yaml)" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Publish release | |
uses: ./.github/actions/publish-release | |
with: | |
replicated-channel: ${{ steps.release-info.outputs.channel-name }} | |
version: ${{ steps.release-info.outputs.version }} | |
release-notes: "CARTO Self-Hosted ${{ steps.release-info.outputs.version }}" | |
trigger-action: ${{ github.event.action }} | |
gcloud-service-account: ${{ secrets.CARTO_ARTIFACTS_SERVICE_ACCOUNT }} | |
replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }} | |
- name: Slack notification | |
if: github.event.action == 'released' | |
env: | |
SLACK_CHANNEL: C02PADFM0E4 # #carto-selfhosted | |
JOB_STATUS: ${{ job.status }} | |
run: | | |
if [ 'success' == "${JOB_STATUS}" ];then | |
status_emoji=:rocket: | |
else | |
status_emoji=:x: | |
fi | |
curl -F "text=${status_emoji} Self Hosted Release \`${{ github.event.release.tag_name }}\` published: | |
- *<https://github.com/CartoDB/carto-selfhosted-helm/releases|Releases>* | |
- *<https://vendor.replicated.com/apps/carto/channels|Channels>*" \ | |
-F "channel=${SLACK_CHANNEL}" \ | |
-H "Authorization: Bearer ${{ secrets.SLACK_KEY }}" \ | |
-X POST https://slack.com/api/chat.postMessage |