Add save as tar for scan #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Publish APM Python Auto-Instrumentation" | |
on: | |
push: | |
branches: | |
- NH-100388-image-rl-scan | |
workflow_dispatch: | |
permissions: | |
packages: write | |
contents: write | |
id-token: write | |
jobs: | |
docker_hub: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read solarwinds_apm version requirement | |
run: echo VERSION=$(head -n 1 image/requirements-nodeps.txt | cut -d '=' -f3) >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log into Docker.io | |
uses: docker/login-action@v3 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
username: ${{ secrets.DOCKER_HUB_CI_USER }} | |
password: ${{ secrets.DOCKER_HUB_CI_PASSWORD }} | |
- name: Login to GitHub Package Registry | |
uses: docker/login-action@v3 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
context: image | |
platforms: linux/amd64,linux/arm64 | |
build-args: version=${{ env.VERSION }} | |
tags: ${{ github.repository_owner }}/autoinstrumentation-python:${{ env.VERSION }},${{ github.repository_owner }}/autoinstrumentation-python:latest | |
- name: Save Docker image as tar file | |
run: docker save -o autoinstrumentation-python-${{ env.VERSION }}.tar ${{ github.repository_owner }}/autoinstrumentation-python:${{ env.VERSION }} | |
- name: Set artifact name | |
run: echo "artifact-name=autoinstrumentation-python-${{ env.VERSION }}.tar" >> $GITHUB_ENV | |
- name: RL scan image (rl-submit-only) | |
env: | |
RLPORTAL_ACCESS_TOKEN: ${{ secrets.RLPORTAL_ACCESS_TOKEN }} | |
uses: reversinglabs/gh-action-rl-scanner-cloud-only@v1 | |
with: | |
artifact-to-scan: ${{ env.artifact-name }} | |
rl-submit-only: true | |
rl-verbose: true | |
rl-portal-server: solarwinds | |
rl-portal-org: SolarWinds | |
rl-portal-group: "SaaS-Agents-SWO" | |
rl-package-url: apm-python/apm-python-autoinstrumentation-image-ghcr@${{ env.VERSION }} | |
- name: Push image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: ${{ github.repository_owner }}/autoinstrumentation-python:${{ env.VERSION }},${{ github.repository_owner }}/autoinstrumentation-python:latest | |
ghcr_io: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read solarwinds_apm version requirement | |
run: echo VERSION=$(head -n 1 image/requirements-nodeps.txt | cut -d '=' -f3) >> $GITHUB_ENV | |
- 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.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
context: image | |
platforms: linux/amd64,linux/arm64 | |
build-args: version=${{ env.VERSION }} | |
tags: ghcr.io/${{ github.repository_owner }}/autoinstrumentation-python:${{ env.VERSION }},ghcr.io/${{ github.repository_owner }}/autoinstrumentation-python:latest | |
- name: Save Docker image as tar file | |
run: docker save -o autoinstrumentation-python-${{ env.VERSION }}.tar ghcr.io/${{ github.repository_owner }}/autoinstrumentation-python:${{ env.VERSION }} | |
- name: Set artifact name | |
run: echo "artifact-name=autoinstrumentation-python-${{ env.VERSION }}.tar" >> $GITHUB_ENV | |
- name: RL scan image (rl-submit-only) | |
env: | |
RLPORTAL_ACCESS_TOKEN: ${{ secrets.RLPORTAL_ACCESS_TOKEN }} | |
uses: reversinglabs/gh-action-rl-scanner-cloud-only@v1 | |
with: | |
artifact-to-scan: ${{ env.artifact-name }} | |
rl-submit-only: true | |
rl-verbose: true | |
rl-portal-server: solarwinds | |
rl-portal-org: SolarWinds | |
rl-portal-group: "SaaS-Agents-SWO" | |
rl-package-url: apm-python/apm-python-autoinstrumentation-image-ghcr@${{ env.VERSION }} |