Skip to content

[k8s] YT-19168: Fix component label for default nodes #11

[k8s] YT-19168: Fix component label for default nodes

[k8s] YT-19168: Fix component label for default nodes #11

Workflow file for this run

name: Release
on:
push:
tags:
- 'release/0\.2\.[0-9]+'
jobs:
start-vm:
name: Start VM
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-yc-runner.outputs.label }}
instance-id: ${{ steps.start-yc-runner.outputs.instance-id }}
steps:
- name: Start YC runner
id: start-yc-runner
uses: yc-actions/yc-github-runner@v1
with:
mode: start
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
folder-id: ${{ vars.YC_FOLDER_ID }}
image-id: ${{ vars.YC_DEFAULT_IMAGE_ID }}
zone-id: ${{ vars.YC_ZONE_ID }}
subnet-id: ${{ vars.YC_SUBNET_ID }}
cores: 4
memory: 8GB
core-fraction: 100
disk-type: network-ssd-nonreplicated
disk-size: 93GB
checkout:
name: Checkout sources
needs: start-vm
runs-on: ${{ needs.start-vm.outputs.label }}
steps:
- name: Checkout
uses: actions/checkout@v3
release:
name: Run release
needs:
- start-vm
- checkout
runs-on: ${{ needs.start-vm.outputs.label }}
env:
HOME: /root
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- 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=${{ steps.tag.outputs.RELEASE_VERSION }}
stop-vm:
name: Stop VM
needs:
- start-vm
- release
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- name: Stop YC runner
uses: yc-actions/yc-github-runner@v1
with:
mode: stop
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-vm.outputs.label }}
instance-id: ${{ needs.start-vm.outputs.instance-id }}
send-notifications:
name: Send notifications
needs:
- stop-vm
runs-on: trampoline
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}}
```