From 31f2b46c4b819949c4ca5c43e924a68937a35a21 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Wed, 25 Sep 2024 10:31:05 +0200 Subject: [PATCH] ci: Updated actions --- .github/workflows/e2e.yaml | 6 +++--- .github/workflows/release.yaml | 28 ++++++++++++---------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e38b2e39..a8ddfbec 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: go.mod @@ -54,7 +54,7 @@ jobs: run: | # Build plugin docker build . -f e2e/test_plugin/Dockerfile -t ghcr.io/loft-sh/test-plugin:v1 - + # Import to kind cluster kind load docker-image ghcr.io/loft-sh/test-plugin:v1 @@ -63,7 +63,7 @@ jobs: continue-on-error: true run: | set -x - + # download vcluster cli curl -L -o vcluster "https://github.com/loft-sh/vcluster/releases/download/${{ env.VCLUSTER_VERSION }}/vcluster-linux-amd64" && sudo install -c -m 0755 vcluster /usr/local/bin && rm -f vcluster diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e34ca237..a4c162ed 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,9 +4,6 @@ on: release: types: [created] -permissions: - contents: read - jobs: publish-image: if: startsWith(github.ref, 'refs/tags/v') == true @@ -18,7 +15,7 @@ jobs: contents: read steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: sigstore/cosign-installer@main with: cosign-release: "v2.0.2" @@ -28,24 +25,24 @@ jobs: echo "::set-output name=release_version::$RELEASE_VERSION" - name: Get Docker tags id: docker_meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ghcr.io/loft-sh/rancher-nodeless-plugin tags: | type=semver,pattern={{version}} type=raw,value=latest - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to ghcr.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io - username: loft-sh + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push the hooks - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 id: docker_build_hooks with: file: ./examples/hooks/Dockerfile @@ -54,10 +51,10 @@ jobs: tags: "ghcr.io/loft-sh/vcluster-example-hooks:${{steps.get_version.outputs.release_version}}" labels: ${{ steps.docker_meta.outputs.labels }} context: ./examples/hooks - - name: Images digests for + - name: Images digests for run: echo ${{ steps.docker_build_hooks.outputs.digest }} - name: Build and push the bootstrap - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 id: docker_build_bootstrap with: file: ./examples/bootstrap-with-deployment/Dockerfile @@ -69,11 +66,11 @@ jobs: - name: Images digests for bootstrap run: echo ${{ steps.docker_build_bootstrap.outputs.digest }} - name: Build and push import secret - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 id: docker_build_import_secret with: file: ./examples/import-secrets/Dockerfile - context: ./examples/import-secrets + context: ./examples/import-secrets platforms: linux/amd64,linux/arm64 push: true tags: "ghcr.io/loft-sh/vcluster-example-import-secrets:${{steps.get_version.outputs.release_version}}" @@ -81,7 +78,7 @@ jobs: - name: Images digests for import secret run: echo ${{ steps.docker_build_import_secret.outputs.digest }} - name: Build and push crd sync - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 id: docker_build_crd_sync with: file: ./examples/crd-sync/Dockerfile @@ -92,4 +89,3 @@ jobs: labels: ${{ steps.docker_meta.outputs.labels }} - name: Images digests for crd sync run: echo ${{ steps.docker_build_crd_sync.outputs.digest }} -