Skip to content

Commit

Permalink
NH-90479: add building auto-instrumentation docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Sep 19, 2024
1 parent e7c056b commit f8b12f5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,4 +508,41 @@ jobs:
echo "AGENT_VERSION=${{ steps.set_version.outputs.version }}.$GIT_HASH" >> $GITHUB_ENV
- name: Publish
run: ./gradlew publish
run: ./gradlew publish

docker_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Set agent version
id: set_version
uses: ./.github/actions/version

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Package Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
context: agent
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
tags: solarwinds/autoinstrumentation-java:${{ steps.set_version.outputs.version }},solarwinds/autoinstrumentation-java:latest
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.set_version.outputs.version }}

docker_hub:
docker_image:
runs-on: ubuntu-latest
needs:
- github_release
Expand Down Expand Up @@ -417,6 +417,13 @@ jobs:
username: ${{ secrets.DOCKER_HUB_CI_USER }}
password: ${{ secrets.DOCKER_HUB_CI_PASSWORD }}

- name: Login to GitHub Package Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit f8b12f5

Please sign in to comment.