Merge pull request #5 from SalesLoft/add_event #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build and Push | |
on: | |
push: | |
branches: | |
- 'salesloft/*' | |
jobs: | |
build-pre-checks: | |
runs-on: | |
group: org/techops | |
labels: [self-hosted] | |
outputs: | |
go-version: ${{ steps.setup-go.outputs.go-version }} | |
steps: | |
- uses: actions/[email protected] | |
- id: setup-go | |
uses: actions/[email protected] | |
with: | |
go-version-file: .go-version | |
vso-docker-build-push: | |
runs-on: | |
group: org/techops | |
labels: [self-hosted] | |
needs: [build-pre-checks] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Extract branch name | |
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/salesloft/}" >> $GITHUB_ENV | |
- name: Setup Docker BuildX | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.SL_QA_DOCKER_REGISTRY }} | |
username: ${{ secrets.SL_QA_DOCKER_USER }} | |
password: ${{ secrets.SL_QA_DOCKER_TOKEN }} | |
- name: Build & Push | |
uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64 | |
push: true | |
file: Dockerfile | |
build-args: | | |
GO_VERSION: ${{ needs.build-pre-checks.outputs.go-version }} | |
tags: ${{ secrets.SL_QA_DOCKER_REGISTRY }}/vault-secrets-operator:${{ env.BRANCH_NAME }}-salesloft | |
- name: Image digest | |
run: echo "Image - vault-secrets-operator:${{ env.BRANCH_NAME }}-salesloft" |