Release #21
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: Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'release/0\.[0-9]+\.[0-9]+' | |
jobs: | |
release: | |
name: Run release | |
runs-on: ubuntu-latest | |
env: | |
HOME: /root | |
steps: | |
- name: checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Set up Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.11.2 | |
- name: Build | |
shell: bash | |
run: | | |
make build | |
- name: Run tests | |
shell: bash | |
run: | | |
make test | |
- name: Docker Hub login | |
shell: bash | |
run: | | |
echo '${{ secrets.DOCKER_HUB_PASSWORD }}' | docker login --username ${{ secrets.DOCKER_HUB_LOGIN}} --password-stdin | |
- name: Parse tag | |
id: tag | |
run: | | |
echo "RELEASE_VERSION=$(echo ${GITHUB_REF#refs/*/release/})" >> $GITHUB_OUTPUT | |
- name: Release | |
shell: bash | |
run: | | |
make release RELEASE_VERSION=0.7.0 | |
send-notifications: | |
name: Send notifications | |
runs-on: ubuntu-latest | |
if: ${{ failure() }} | |
steps: | |
- name: Send telegram message | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_CHAT_ID }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
disable_web_page_preview: true | |
format: markdown | |
message: | | |
Workflow *${{github.workflow}}* failed: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}. Commit: | |
``` | |
${{github.event.head_commit.message}} | |
``` | |