File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed
Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ env :
9+ ECR_REPO : public.ecr.aws/odigos/agents/ruby-community
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ id-token : write
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v6
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
25+ - name : Set up QEMU
26+ uses : docker/setup-qemu-action@v3
27+
28+ - name : Configure AWS credentials
29+ uses : aws-actions/configure-aws-credentials@v4
30+ with :
31+ role-to-assume : arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-ecr-upload
32+ aws-region : ' us-east-1'
33+
34+ - name : Log in to Amazon ECR
35+ run : |
36+ aws ecr-public get-login-password --region us-east-1 \
37+ | docker login --username AWS --password-stdin public.ecr.aws
38+
39+ - name : Build and push Docker image
40+ uses : docker/build-push-action@v6
41+ with :
42+ context : .
43+ platforms : linux/amd64,linux/arm64
44+ file : release.Dockerfile
45+ push : true
46+ build-args : AGENT_VERSION=${{ github.ref_name }}
47+ tags : ${{ env.ECR_REPO }}:${{ github.ref_name }},${{ env.ECR_REPO }}:latest
48+
49+ - name : Notify Slack
50+ uses : odigos-io/ci-core/.github/actions/slack-release-notification@main
51+ with :
52+ webhook-url : ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }}
53+ success-description : " Published a new release of OpenTelemetry Ruby Community Agent"
54+ failure-description : " ERROR: Failed to publish a new release of OpenTelemetry Ruby Community Agent"
55+ tag : ${{ github.ref_name }}
56+
Original file line number Diff line number Diff line change 1+ FROM --platform=$BUILDPLATFORM alpine AS ruby-community-build
2+ WORKDIR /opentelemetry-ruby
3+ ARG TARGETARCH
4+ ARG RUBY_VERSIONS="3.1 3.2 3.3 3.4"
5+ ENV RUBY_VERSIONS=${RUBY_VERSIONS}
6+ COPY . .
7+
8+ # create a directory for the instrumentations and put each ruby version in it
9+ RUN mkdir -p /instrumentations/ruby
10+
11+ # Move the pre-compiled binaries for the target architecture to the final location
12+ RUN for v in ${RUBY_VERSIONS}; do \
13+ mkdir -p /instrumentations/ruby/$v; \
14+ mv ./$v/${TARGETARCH}/* /instrumentations/ruby/$v/; \
15+ done
16+
17+ FROM scratch
18+ WORKDIR /instrumentations
19+
20+ COPY --from=ruby-community-build /instrumentations .
You can’t perform that action at this time.
0 commit comments