artifacts/.github/workflows/prometheus-to-cloudwatch-image.yaml
2023-02-20 10:47:32 +08:00

38 lines
1.1 KiB
YAML

name: Build and push prometheus-to-cloudwatch Image
on:
pull_request:
push:
paths:
- 'oci/prometheus-to-cloudwatch/main.go'
- 'oci/prometheus-to-cloudwatch/Makefile'
- 'oci/prometheus-to-cloudwatch/Dockerfile'
- 'oci/prometheus-to-cloudwatch/prometheus_to_cloudwatch.go'
- '.github/workflows/packer/bootstrap.sh'
- '.github/workflows/prometheus-to-cloudwatch-image.yaml'
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
name: Build docker image
steps:
- uses: actions/checkout@master
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: 'Artifact: k8s/prometheus-to-cloudwatch'
uses: aevea/action-kaniko@master
with:
registry: artifact.onwalk.net
username: admin
password: ${{ secrets.HELM_REPO_PASSWORD }}
path: 'oci/prometheus-to-cloudwatch'
build_file: ./Dockerfile
image: k8s/prometheus-to-cloudwatch
tag: ${{ steps.slug.outputs.sha8 }}
cache: true
cache_registry: cache