diff --git a/.github/workflows/docker.build.yaml b/.github/workflows/docker.build.yaml index 3b73d1e..d34e9a2 100644 --- a/.github/workflows/docker.build.yaml +++ b/.github/workflows/docker.build.yaml @@ -1,4 +1,4 @@ -name: Build Docker Image +name: Build on: schedule: - cron: '30 11 * * *' @@ -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 @@ -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 @@ -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 @@ -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 "$GITHUB_ACTOR@users.noreply.github.com" - - 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 }}