exporting the NS name to the post hook #431
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
jobs: | |
helm: | |
name: Push to the Helm Repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get current time | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT | |
- name: Clone | |
uses: actions/checkout@v3 | |
- name: Push | |
shell: bash | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
HELM_REPO_NAME: s3://fh-eeq-helm-repository/charts | |
HELM_REPO_PLUGIN_NAME: https://github.com/hypnoglow/helm-s3.git | |
TIME: ${{ steps.date.outputs.date }} | |
run: | | |
helm version --short -c | |
helm plugin install $HELM_REPO_PLUGIN_NAME | |
helm repo add remote $HELM_REPO_NAME | |
helm dependency build src/prune/charts/kube-review-prune || helm dependency update charts/kube-review-prune || echo "dependencies cannot be updated" | |
PACKAGE="$(helm package src/prune/charts/kube-review-prune --version 0.0.1-$TIME --destination /tmp | cut -d " " -f 8)" | |
helm s3 push $PACKAGE remote | |
build: | |
name: Building Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
with: | |
push: true | |
tags: | | |
findhotelamsterdam/kube-review:${{ github.sha }} | |
findhotelamsterdam/kube-review:${{ env.BRANCH_NAME }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: | | |
DEFAULT_HELM_REPO_URL=s3://fh-eeq-helm-repository/charts |