Skip to content

feat: add dedicated hetzner machines #74

feat: add dedicated hetzner machines

feat: add dedicated hetzner machines #74

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '>=1.19.0'
- name: Go install
run: go install ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: go-fmt-import
uses: Jerome1337/[email protected]
- name: go-vet
run: go vet -v ./...
- name: gofumpt
run: |
go install mvdan.cc/gofumpt@latest
LIST_OF_FILES=$(gofumpt -l .)
echo "$LIST_OF_FILES"
if [ -n "$LIST_OF_FILES" ]; then
exit 1
fi
- name: go-err-check
run: |
go install github.com/kisielk/errcheck@latest
errcheck ./...
- name: go-static-check
uses: dominikh/[email protected]
with:
install-go: false
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
build:
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '>=1.19.0'
- run: go version
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v6
with:
strip_tag_prefix: v
- name: Generate version info
id: version
run: |
if [ "${{ steps.branch-name.outputs.is_tag }}" = "true" ];
then
echo "version=${{ steps.branch-name.outputs.tag }}" >> "$GITHUB_OUTPUT"
else
echo "version=development" >> "$GITHUB_OUTPUT"
fi
echo "commit_id=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
echo "gitRepo=github.com/${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
- name: Compile binaries
run: ./hack/build.sh
env:
GIT_COMMIT: ${{ steps.version.outputs.commit_id }}
GIT_REPO: ${{ steps.version.outputs.gitRepo }}
RELEASE_VERSION: ${{ steps.version.outputs.version }}
- uses: actions/setup-node@v3
if: steps.branch-name.outputs.is_tag == 'true'
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
if: steps.branch-name.outputs.is_tag == 'true'
uses: softprops/action-gh-release@v1
with:
body: ${{steps.github_release.outputs.changelog}}
files: dist/*