diff --git a/.github/workflows/operator.yaml b/.github/workflows/operator.yaml index c3683187..24cd4cc8 100644 --- a/.github/workflows/operator.yaml +++ b/.github/workflows/operator.yaml @@ -11,29 +11,13 @@ on: - "*" jobs: - helm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Push Helm chart to OCI compatible registry (DockerHub) - uses: bsord/helm-push@v4.1.0 - with: - useOCIRegistry: true - registry-url: oci://registry-1.docker.io/cbartifactory - username: ${{ secrets.DOCKERHUB_USER }} - access-token: ${{ secrets.DOCKERHUB_PASSWORD }} - version: '3.1.1' - appVersion: '3.1.1' - force: true - chart-folder: charts/cbcontainers-operator/cbcontainers-operator-chart build: - if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASSWORD }} @@ -45,7 +29,7 @@ jobs: octarine-operator flavor: | latest=false - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v2 with: @@ -61,4 +45,14 @@ jobs: - run: make manifests - run: make test - name: Build and push + if: github.ref == 'refs/heads/master' run: make docker-build docker-push IMG=cbartifactory/${{ steps.meta.outputs.tags }} VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} + - name: Install Helm + uses: azure/setup-helm@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Create and push chart + run: | + cd ${{ github.workspace }}/charts/cbcontainers-operator/cbcontainers-operator-chart + helm package . + helm push *.tgz oci://registry-1.docker.io/cbartifactory