From 70a0f67117df2543360f97640880d695431f52fa Mon Sep 17 00:00:00 2001 From: Jay Danielsen Date: Tue, 15 Oct 2024 10:04:12 -0400 Subject: [PATCH] publish docker image to docker.artifactory --- .github/workflows/build-deploy-pipeline.yaml | 29 ++++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-deploy-pipeline.yaml b/.github/workflows/build-deploy-pipeline.yaml index f3439b4..01cf37d 100644 --- a/.github/workflows/build-deploy-pipeline.yaml +++ b/.github/workflows/build-deploy-pipeline.yaml @@ -42,18 +42,23 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.TOKEN }} - - name: Build image - uses: Brandwatch/bw-workflow-actions/steps/generic/dockerfile-image@production + docker: + runs-on: ubuntu-latest + steps: + - name: Log in to docker.artifactory.brandwatch.com + uses: docker/login-action@v3 with: - images: ${{ github.event.repository.name }} - tag: ${{ github.ref_name }}-${{ github.run_id }} - brandwatch-artifactory-docker-push-password: ${{ secrets.ARTIFACTORY_DOCKER_PUSH_PASSWORD }} - cpu-architectures: amd64 + registry: docker.artifactory.brandwatch.com + username: github-actions-docker-push + password: ${{ secrets.ARTIFACTORY_DOCKER_PUSH_PASSWORD }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Scan And Push Image - uses: Brandwatch/bw-workflow-actions/steps/generic/scan-and-push-image@production + - name: Build and push + uses: docker/build-push-action@v6 with: - artifactory-pwd: ${{ secrets.ARTIFACTORY_DOCKER_PUSH_PASSWORD }} - images: ${{ github.event.repository.name }} - tag: ${{ github.ref_name }}-${{ github.run_id }} - trivy-kill-key: ${{ secrets.TRIVY_KILL_KEY }} + push: true + tags: | + ${{ format('{0}/{1}-{2}', github.event.repository.name, github.ref_name, 'amd64') }} + ${{ format('{0}/{1}-{2}', github.event.repository.name, github.ref_name, github.run_id) }}