Skip to content

refactor: implement sub-commands and validate container image #9

refactor: implement sub-commands and validate container image

refactor: implement sub-commands and validate container image #9

# Builds and publishes a container image to docker.elastic.co/observability-ci/apm-perf:latest
# This workflow is triggered on push to main branch when cmd, loadgen, soaktest, Containerfile or this file are changed
name: publish-docker-images
on:
pull_request:
branches:
- main
push:
branches:
- main
paths:
- ".github/workflows/publish-docker-image.yml"
- "cmd/**"
- "loadgen/**"
- "soaktest/**"
- "Containerfile"
permissions:
contents: read
jobs:
publish-container-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: elastic/apm-pipeline-library/.github/actions/docker-login@main
with:
registry: docker.elastic.co
secret: secret/observability-team/ci/docker-registry/prod
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
- name: Build container image
run: make package
- name: Test container image
run: make sanitize
- name: Push container image
run: make publish