Skip to content

chore: add helm chart #3

chore: add helm chart

chore: add helm chart #3

Workflow file for this run

---
name: Release docker
on:
push:
branches:
- "main"
tags:
- "v*"
jobs:
docker-release:
name: docker release
runs-on: ubuntu-latest
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v2
- name: set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: docker login
uses: docker/[email protected]
with:
# registry: ${{ secrets.DOCKERHUB_ADDR }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: prepare short tag
id: prepare_short_tag
run: |
SHORT_TAG=`git describe --abbrev=5 --dirty --tags --always`
echo "::set-output name=image_short_tag::$SHORT_TAG"
echo "::notice title=Build Image Short Tag::$SHORT_TAG"
- name: prepare tag
id: prepare_tag
run: |
TIME_TAG=`TZ=Zero date +"%y%m%d%H%M%S"`
COMMIT_TAG=`echo $GITHUB_SHA | cut -c 1-7`
TAG="$TIME_TAG-$COMMIT_TAG"
echo "::set-output name=image_tag::$TAG"
echo "::notice title=Build Image Tag::$TAG"
- name: build and push
uses: docker/build-push-action@v2
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
tags: |
bougou/alertmanager-webhook-adapter:latest
bougou/alertmanager-webhook-adapter:${{ steps.prepare_tag.outputs.image_tag }}
bougou/alertmanager-webhook-adapter:${{ steps.prepare_short_tag.outputs.image_short_tag }}