fix(github): fix github enterprise authentication #62
Workflow file for this run
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: Build stable Docker image (tags) | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
name: Create docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Submodule | |
run: git submodule update --recursive --remote --merge --force | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@master | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
file: ./Dockerfile | |
builder: ${{ steps.buildx.outputs.name }} | |
push: true | |
tags: ghcr.io/krateoplatformops/${{ github.event.repository.name }}:${{steps.tag.outputs.tag}} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
build-args: 'VERSION=${{ steps.tag.outputs.tag }}' | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
publish: | |
name: Create helm chart | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Submodule | |
run: git submodule update --recursive --remote --merge --force | |
- name: Set tag | |
run: echo "::set-output name=VERSION_TAG::$(git describe --dirty --always --tags | sed 's/-/./2' | sed 's/-/./2' )" | |
id: tagger | |
- name: Replace Version in Chart.yaml | |
run: sed -i 's/VERSION/${{ steps.tagger.outputs.VERSION_TAG }}/g' ./chart/Chart.yaml | |
- name: Publish Helm chart | |
uses: stefanprodan/helm-gh-pages@master | |
with: | |
token: ${{ secrets.HELM_CHARTS_BOT }} | |
charts_dir: ./ | |
charts_url: https://charts.krateo.io | |
owner: krateoplatformops | |
repository: helm-charts | |
branch: gh-pages |