Skip to content

Commit

Permalink
Merge pull request #2 from BrandwatchLtd/CCTQ-159
Browse files Browse the repository at this point in the history
build and publish docker image in docker.artifacory.brandwatch.com
  • Loading branch information
jaydanielsencision authored Oct 15, 2024
2 parents 0207d15 + b6d861b commit b44b573
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 56 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build-deploy-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build, Deploy pipeline

permissions:
checks: write
contents: read
on:
push:
branches:
- main
- master

jobs:
release:
runs-on: ubuntu-latest
name: Release
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 ./...

- name: Build
run: make release

- name: Upload
run: |
./upload.sh ./bin/script_exporter-darwin-amd64 application/x-binary
./upload.sh ./bin/script_exporter-linux-amd64 application/x-binary
./upload.sh ./bin/script_exporter-linux-armv7 application/x-binary
./upload.sh ./bin/script_exporter-linux-arm64 application/x-binary
./upload.sh ./bin/script_exporter-windows-amd64.exe application/x-binary
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}

- name: Build image
uses: Brandwatch/bw-workflow-actions/steps/generic/dockerfile-image@production
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

- name: Scan And Push Image
uses: Brandwatch/bw-workflow-actions/steps/generic/scan-and-push-image@production
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 }}
56 changes: 0 additions & 56 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit b44b573

Please sign in to comment.