Skip to content

Commit

Permalink
Merge branch 'feature/docker-images-wolfi' into test-wolfi
Browse files Browse the repository at this point in the history
* feature/docker-images-wolfi:
  ci: use docker/metadata-action to gather tags/labels (#3998)
  chore(deps): bump @opentelemetry/exporter-prometheus (#4016)
  chore(deps): bump @opentelemetry/sdk-metrics to 1.24.1 in test fixtures (#4015)
  chore(deps): bump @opentelemetry/sdk-metrics from 1.24.0 to 1.24.1 (#4014)
  chore(deps-dev): bump azure-functions-core-tools (#4017)
  chore(deps-dev): bump undici from 6.15.0 to 6.16.1 (#4013)
  chore(deps-dev): bump fastify from 4.26.2 to 4.27.0 (#4012)
  chore(deps): bump pino from 8.17.1 to 8.21.0 (#4011)
  chore(deps): bump @opentelemetry/core from 1.24.0 to 1.24.1 (#4010)
  chore(deps-dev): bump mongodb from 6.6.0 to 6.6.1 (#4009)
  chore(deps-dev): bump eslint-plugin-n in the eslint group (#4008)
  • Loading branch information
v1v committed May 13, 2024
2 parents f142617 + 3d8c35b commit 2a584e4
Show file tree
Hide file tree
Showing 5 changed files with 357 additions and 167 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,34 +109,30 @@ jobs:
with:
name: build-distribution
path: ./build/dist
- id: docker-vars
name: Set up docker variables
run: |-
TAG=test
LATEST=test-latest
if [ "${{ startsWith(github.ref, 'refs/tags') }}" == "true" ] ; then
# version without v prefix (e.g. 1.2.3)
TAG="${GITHUB_REF_NAME/v/}"
LATEST=latest
fi
if [ "${{ contains(matrix.dockerfile, 'wolfi') }}" == "true" ] ; then
# version without v prefix (e.g. 1.2.3)
TAG="${TAG}-wolfi"
LATEST="${LATEST}-wolfi"
fi
echo "tag=${TAG}" >> "${GITHUB_OUTPUT}"
echo "latest=${LATEST}" >> "${GITHUB_OUTPUT}"

- 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
suffix=${{ contains(matrix.dockerfile, 'wolfi') && '-wolfi' || '' }}
tags: |
# "1.2.3" and "latest" Docker tags on push of git tag "v1.2.3"
type=semver,pattern={{version}}
# "edge" Docker tag on git push to default branch
type=edge
- name: Build and Push Docker Image
id: docker-push
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: |
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.docker-vars.outputs.tag }}
${{ env.DOCKER_IMAGE_NAME }}:${{ steps.docker-vars.outputs.latest }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
build-args: |
AGENT_DIR=/build/dist/nodejs
Expand Down

0 comments on commit 2a584e4

Please sign in to comment.