Skip to content

Merge pull request #7 from BrandwatchLtd/CCTQ-159 #6

Merge pull request #7 from BrandwatchLtd/CCTQ-159

Merge pull request #7 from BrandwatchLtd/CCTQ-159 #6

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
env:
IMAGE_ID: docker.artifactory.brandwatch.com/${{ github.event.repository.name }}:${{ github.ref_name }}
with:
push: true
tags: ${{ format('{0}-{1}', env.IMAGE_ID, 'amd64') }},${{ format('{0}-{1}', env.IMAGE_ID, github.run_id) }}