Skip to content

Commit

Permalink
Merge branch 'feature/provenance' into test/provenance
Browse files Browse the repository at this point in the history
* feature/provenance:
  fix
  rename
  fix cache export is not supported for the docker driver.
  • Loading branch information
v1v committed Jun 6, 2024
2 parents e36b9e0 + fa52ebd commit 1407853
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
PREFIX_APM_PROFILER: "build/output/elastic_apm_profiler_"
SUFFIX_APM_AGENT: ".zip"
SUFFIX_APM_PROFILER: "-linux-x64.zip"
DOCKER_IMAGE: "docker.elastic.co/observability/apm-agent-dotnet"
DOCKER_IMAGE_NAME: "docker.elastic.co/observability/apm-agent-dotnet"
permissions:
attestations: write
contents: write
Expand Down Expand Up @@ -54,6 +54,19 @@ jobs:
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels)
id: docker-meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.DOCKER_IMAGE_NAME }}
flavor: |
latest=auto
tags: |
# "1.2.3" and "latest" Docker tags on push of git tag "v1.2.3"
type=semver,value=${{ steps.bootstrap.outputs.agent-version }}
# "edge" Docker tag on git push to default branch
type=edge
- name: Build and Push Profiler Docker Image
id: docker-push
continue-on-error: true # continue for now until we see it working in action
Expand All @@ -63,15 +76,16 @@ jobs:
cache-to: type=gha,mode=max
context: .
push: false
tags: |
${{ env.DOCKER_IMAGE }}:${{ steps.bootstrap.outputs.agent-version }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
build-args: |
AGENT_ZIP_FILE=${{ env.PREFIX_APM_PROFILER }}${{ steps.bootstrap.outputs.agent-version }}${{ env.SUFFIX_APM_PROFILER }}
- name: Attest image
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0
continue-on-error: true # continue for now until we see it working in action
with:
subject-name: ${{ env.DOCKER_IMAGE }}
subject-name: ${{ env.DOCKER_IMAGE_NAME }}
subject-digest: ${{ steps.docker-push.outputs.digest }}
push-to-registry: false

Expand Down

0 comments on commit 1407853

Please sign in to comment.