From deae2c9cf666d0faaee29a0d1db6ed01ca7a5ce6 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 27 Dec 2022 12:22:21 +0800 Subject: [PATCH] add github-ci workflow --- .github/workflows/images.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/images.yaml diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml new file mode 100644 index 0000000..23fd1b5 --- /dev/null +++ b/.github/workflows/images.yaml @@ -0,0 +1,32 @@ +name: BUILD Images +on: + pull_request: + push: + paths: + - '.github/workflows/images.yaml' + - 'Dockerfiles' + 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 }} + build_file: ./Dockerfiles/prometheus-to-cloudwatch.Dockerfile + image: k8s/prometheus-to-cloudwatch + tag: ${{ steps.slug.outputs.sha8 }} + cache: true + cache_registry: cache