mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 01:34:01 +00:00
884a95cc10
* draft go script * print end stats * remove empty * default start date * prios * todo * update ratelimiter algo * add comments * dockerfile stuff * include image workflow * use official product names * comments + rephrase output * fix various script bugs * feedback * wording * show users option * use multistage to reduce image size * make throttle error handling stable * lowercase fns * set go.mod to 1.19 to match main project * Update examples/teleport-usage/main.go Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com> * exp ratelimit * okay, seems binary search throttling is best * add test coverage for ratelimiter * add span test * remove unused const * use custom retry passby * update flaky tests ci * split job * fix makefile * oops * run tests in integration job * go mod tidy --------- Co-authored-by: Gavin Frazar <gavin.frazar@goteleport.com>
32 lines
983 B
YAML
32 lines
983 B
YAML
name: build-usage-image
|
|
on:
|
|
release:
|
|
types: ["published"]
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
jobs:
|
|
image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# This step is used to extract the version of the usage script.
|
|
- name: Trim leading v in release
|
|
id: version
|
|
run: |
|
|
echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
|
|
- uses: actions/checkout@v3
|
|
- uses: docker/setup-buildx-action@v2
|
|
- uses: aws-actions/configure-aws-credentials@v1
|
|
with:
|
|
role-to-assume: ${{ secrets.TELEPORT_USAGE_IAM_ROLE_ARN }}
|
|
aws-region: us-east-1
|
|
- uses: aws-actions/amazon-ecr-login@v1
|
|
with:
|
|
registry-type: public
|
|
# Build and publish container image on ECR.
|
|
- uses: docker/build-push-action@v3
|
|
with:
|
|
context: "examples/teleport-usage"
|
|
tags: public.ecr.aws/gravitational/teleport-usage:${{ steps.version.outputs.version }}
|
|
push: true
|