From 633445f70b43de4f2576a9b0163cb7099b348194 Mon Sep 17 00:00:00 2001 From: Jaroslav Fedor Date: Tue, 8 Oct 2024 19:53:51 +0200 Subject: [PATCH] Add release based on tag --- .github/workflows/build-and-release.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-release.yaml b/.github/workflows/build-and-release.yaml index d2307306..574c5fc0 100644 --- a/.github/workflows/build-and-release.yaml +++ b/.github/workflows/build-and-release.yaml @@ -5,6 +5,9 @@ name: build-and-release run-name: Publishing a release on: + push: + tags: + - '*.*.*' workflow_dispatch: inputs: release_type: @@ -37,11 +40,9 @@ on: env: BENV_IMAGE: quay.io/splunko11ytest/network-explorer-debug/build-env - DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_CI_USER }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_CI_PASSWORD }} DOCKER_REGISTRY: docker.io DOCKER_NAMESPACE: solarwinds - IMAGE_PREFIX: ${{ inputs.image_prefix }} + IMAGE_PREFIX: "opentelemetry-ebpf-" jobs: build-and-release: @@ -86,9 +87,12 @@ jobs: echo "short_version_number = ${short_version_number}" echo "full_version_number = ${full_version_number}" echo "github_tag = ${github_tag}" - - name: Log-in to container registry - run: | - docker login --username="$DOCKER_USERNAME" --password-stdin $DOCKER_REGISTRY <<< "$DOCKER_PASSWORD" + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_CI_USER }} + password: ${{ secrets.DOCKER_HUB_CI_PASSWORD }} - name: Fetch build environment run: | docker pull $BENV_IMAGE