Skip to content

fix vCPU calc

fix vCPU calc #7

Workflow file for this run

name: Update README.md and create release
on:
push:
branches:
- main
paths-ignore:
- README.md
- docs/**
- .buildkite/**
- .github/**
- docker-compose.yml
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: login to ghcr.io
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- name: Calculate new version with autotag
run: |
curl -sL https://git.io/autotag-install | sh -s -- -b "${RUNNER_TEMP}/bin"
set -x
version=$(${RUNNER_TEMP}/bin/autotag -n)
echo "version=$version" >> $GITHUB_ENV
- name: Update version in README.md and hooks/pre-command
run: |
sed -i'' -Ee "s/telemetry#v(.*):/telemetry#v${version}:/" README.md
sed -i'' -Ee "s/TAG=\"v(.*)\"/TAG=\"v${version}\"/" hooks/pre-command
- name: Commit changes
uses: planetscale/ghcommit-action@c7915d6c18d5ce4eb42b0eff3f10a29fe0766e4c # v0.1.44
with:
commit_message: "🤖 Bump version"
repo: ${{ github.repository }}
branch: ${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Release
run: |
set -eou pipefail
set -x
image="ghcr.io/planetscale/telemetry-buildkite-plugin:v${version}"
git reset --hard && git clean -ffdx && git pull
docker build -t "$image" .
docker push "$image"
gh release create "v${version}" --target main --title "v${version}" --generate-notes
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}