Merge pull request #5 from BrandwatchLtd/CCTQ-159 #4
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: Build, Deploy pipeline | |
permissions: | |
checks: write | |
contents: read | |
on: | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: Build and Test | |
steps: | |
- name: Set up Go 1.13 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.13 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Get dependencies | |
run: go mod download | |
- name: Test | |
run: go test ./... | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Log in to docker.artifactory.brandwatch.com | |
uses: docker/login-action@v3 | |
with: | |
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: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
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) }} |