File tree Expand file tree Collapse file tree 4 files changed +22
-10
lines changed
Expand file tree Collapse file tree 4 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 33 push :
44 branches :
55 - main
6+ - gha-release-2
67 paths-ignore :
78 - README.md
89 - .buildkite/**
910 - .github/**
1011 - docker-compose.yml
12+ workflow_dispatch :
1113
1214jobs :
1315 build :
1416 runs-on : ubuntu-latest
1517
1618 permissions :
1719 contents : write
20+ packages : write
1821
1922 steps :
2023 - name : login to ghcr.io
@@ -28,20 +31,24 @@ jobs:
2831 with :
2932 fetch-depth : 0
3033
31- - name : Update README.md
34+ - name : Calculate new version with autotag
3235 run : |
3336 curl -sL https://git.io/autotag-install | sh -s -- -b "${RUNNER_TEMP}/bin"
3437 set -x
3538 version=$(${RUNNER_TEMP}/bin/autotag -n)
39+ echo "version=$version" >> $GITHUB_ENV
40+
41+ - name : Update version in README.md and hooks/pre-command
42+ run : |
3643 sed -i'' -Ee "s/telemetry#v(.*):/telemetry#v${version}:/" README.md
44+ sed -i'' -Ee "s/TAG=\"v(.*)\"/TAG=\"v${version}\"/" hooks/pre-command
3745
38- - name : Commit README.md
46+ - name : Commit changes
3947 uses : planetscale/ghcommit-action@c7915d6c18d5ce4eb42b0eff3f10a29fe0766e4c # v0.1.44
4048 with :
41- commit_message : " 🤖 Update README.md "
49+ commit_message : " 🤖 Update version tag "
4250 repo : ${{ github.repository }}
4351 branch : ${{ github.head_ref || github.ref_name }}
44- file_pattern : README.md
4552 env :
4653 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
4754
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ BUILDKITE_TELEMETRY_PLUGIN_TMPDIR=$( mktemp -d)
3+ BUILDKITE_TELEMETRY_PLUGIN_OUTFILE=" ${BUILDKITE_TELEMETRY_PLUGIN_TMPDIR} /out.txt"
4+
5+ export BUILDKITE_TELEMETRY_PLUGIN_TMPDIR
6+ export BUILDKITE_TELEMETRY_PLUGIN_OUTFILE
Original file line number Diff line number Diff line change 33set -eou pipefail
44# set -x
55
6- # TODO: proper tempdir scoped to this invocation
6+ docker stop -t1 telemetry-plugin
77
8- docker stop -t1 dstat
98echo " +++ :bar_chart: Telemetry:"
109cat " $BUILDKITE_TELEMETRY_PLUGIN_OUTFILE "
1110
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33set -eou pipefail
4- set -x
4+ # set -x
55
6- # TODO: proper tempdir scoped to this invocation
6+ TAG= " v0.0.0 "
77
88docker run \
99 --rm \
1010 --init \
1111 --detach \
12- --name dstat \
12+ --name telemetry-plugin \
1313 --pid host \
1414 --net host \
1515 --userns host \
1616 -v " $BUILDKITE_TELEMETRY_PLUGIN_TMPDIR :$BUILDKITE_TELEMETRY_PLUGIN_TMPDIR " \
17- ghcr.io/planetscale/telemetry-buildkite-plugin:latest \
17+ ghcr.io/planetscale/telemetry-buildkite-plugin:" $TAG " \
1818 " dstat -t -c -m -n --disk-tps --disk --color --noupdate 10 > $BUILDKITE_TELEMETRY_PLUGIN_OUTFILE "
1919
2020docker ps -a
You can’t perform that action at this time.
0 commit comments