Skip to content

Commit

Permalink
Migrate Helm registry to Harbor
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlemke committed Sep 16, 2024
1 parent 9d0876c commit ee2a256
Showing 1 changed file with 34 additions and 17 deletions.
51 changes: 34 additions & 17 deletions .github/workflows/docker.build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker Image
name: Build
on:
schedule:
- cron: '30 11 * * *'
Expand All @@ -12,19 +12,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: 'main'
ref: main
fetch-depth: 100

- name: Determine latest version
id: latest_version
uses: flownative/action-git-latest-release@master
uses: flownative/action-git-latest-release@v1

- run: |
sudo chmod -R ugo+rwX . && shopt -s dotglob && rm -rf *
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ steps.latest_version.outputs.tag }}
fetch-depth: 100
Expand All @@ -51,10 +51,9 @@ jobs:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

-
name: Set up Docker Buildx
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

Expand All @@ -71,8 +70,15 @@ jobs:
username: '_json_key'
password: ${{ secrets.GOOGLE_ARTIFACTS_PASSWORD_DOCKER }}

- name: Login to Harbor
uses: docker/login-action@v3
with:
registry: harbor.flownative.io
username: ${{ secrets.HARBOR_BEACH_USERNAME }}
password: ${{ secrets.HARBOR_BEACH_PASSWORD }}

- name: Build Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
Expand All @@ -91,22 +97,33 @@ jobs:

release-helm:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: main
ref: 'main'
fetch-depth: 100

- name: Determine latest version
id: latest_version
uses: flownative/action-git-latest-release@master
uses: flownative/action-git-latest-release@main

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Release Helm chart
uses: flownative/action-helm-release@v1
- name: Release Helm chart (Harbor)
uses: flownative/action-helm-release@v2.0.1
with:
charts_folder: 'Helm'
chart_name: 'redis'
chart_version: ${{ steps.latest_version.outputs.tag }}
app_version: ${{ steps.latest_version.outputs.tag }}
repository_url: 'https://charts.flownative.io'
repository_user: '${{ secrets.CHARTMUSEUM_USER }}'
repository_password: '${{ secrets.CHARTMUSEUM_PASSWORD }}'
registry_host: 'harbor.flownative.io'
repository_path: 'beach-charts'
repository_user: ${{ secrets.HARBOR_BEACH_CHARTS_USERNAME }}
repository_password: ${{ secrets.HARBOR_BEACH_CHARTS_PASSWORD }}

0 comments on commit ee2a256

Please sign in to comment.