forked from ricoberger/script_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.26 KB
/
build-deploy-pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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.repository.event.name }}:${{ github.ref_name }}
with:
push: true
tags: ${{ format('{0}-{1}', env.IMAGE_ID, 'amd64') }},${{ format('{0}-{1}', env.IMAGE_ID, github.run_id) }}