diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index a74d878f0..736160202 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -18,12 +18,12 @@ jobs: GO111MODULE: on steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build test for ${{ matrix.goarch }} env: @@ -41,7 +41,7 @@ jobs: name: coverage steps: - name: Set up Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v4 with: go-version: 1.20.x @@ -52,7 +52,7 @@ jobs: run: sudo make test-coverage # sudo needed for netns change in test - name: Coveralls - uses: coverallsapp/github-action@1.1.3 + uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: test/coverage/lcov.info + file: test/coverage/lcov.info diff --git a/.github/workflows/image-push-master.yml b/.github/workflows/image-push-master.yml index 47226edfd..452ba1878 100644 --- a/.github/workflows/image-push-master.yml +++ b/.github/workflows/image-push-master.yml @@ -13,27 +13,27 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push sriov-cni - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true platforms: linux/amd64 tags: | ${{ env.IMAGE_NAME }}:latest-amd64 - ${{ steps.docker_meta.outputs.tags }}:${{ github.sha }} + ${{ env.IMAGE_NAME }}:${{ github.sha }} file: ./Dockerfile build-and-push-arm64-sriov-cni: @@ -41,23 +41,23 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push sriov-cni - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -71,23 +71,23 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push sriov-cni - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -101,10 +101,10 @@ jobs: needs: [build-and-push-amd64-sriov-cni,build-and-push-amr64-sriov-cni,build-and-push-ppc64le-sriov-cni] steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -112,15 +112,7 @@ jobs: - name: Create manifest for multi-arch images run: | - # pull - docker pull ${{ env.IMAGE_NAME }}:latest-amd64 - docker pull ${{ env.IMAGE_NAME }}:latest-arm64 - docker pull ${{ env.IMAGE_NAME }}:latest-ppc64le - # create - docker manifest create ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:latest-amd64 ${{ env.IMAGE_NAME }}:latest-arm64 ${{ env.IMAGE_NAME }}:latest-ppc64le - # annotate - docker manifest annotate ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:latest-amd64 --arch amd64 - docker manifest annotate ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:latest-arm64 --arch arm64 - docker manifest annotate ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:latest-ppc64le --arch ppc64le - # push - docker manifest push ${{ env.IMAGE_NAME }}:latest \ No newline at end of file + docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest \ + ${{ env.IMAGE_NAME }}:latest-amd64 \ + ${{ env.IMAGE_NAME }}:latest-arm64 \ + ${{ env.IMAGE_NAME }}:latest-ppc64le \ No newline at end of file diff --git a/.github/workflows/image-push-release.yml b/.github/workflows/image-push-release.yml index 9d91a0cc5..113a7a3ee 100644 --- a/.github/workflows/image-push-release.yml +++ b/.github/workflows/image-push-release.yml @@ -13,13 +13,13 @@ jobs: name: Image push AMD64 steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -27,13 +27,14 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: images: ${{ env.IMAGE_NAME }} - tag-latest: false + tags: | + type=ref,event=tag - name: Build and push sriov-cni - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -48,13 +49,13 @@ jobs: name: Image push ARM64 steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -62,13 +63,14 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: images: ${{ env.IMAGE_NAME }} - tag-latest: false + tags: | + type=ref,event=tag - name: Build and push sriov-cni - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -82,13 +84,13 @@ jobs: name: Image push ppc64le steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -96,13 +98,14 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: images: ${{ env.IMAGE_NAME }} - tag-latest: false + tags: | + type=ref,event=tag - name: Build and push sriov-cni - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true @@ -116,17 +119,18 @@ jobs: needs: [build-and-push-amd64-sriov-cni,build-and-push-amr64-sriov-cni,build-and-push-ppc64le-sriov-cni] steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: images: ${{ env.IMAGE_NAME }} - tag-latest: false + tags: | + type=ref,event=tag - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -134,15 +138,7 @@ jobs: - name: Create manifest for multi-arch images run: | - # pull - docker pull ${{ steps.docker_meta.outputs.tags }}-amd64 - docker pull ${{ steps.docker_meta.outputs.tags }}-arm64 - docker pull ${{ steps.docker_meta.outputs.tags }}-ppc64le - # create - docker manifest create ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-amd64 ${{ steps.docker_meta.outputs.tags }}-arm64 ${{ steps.docker_meta.outputs.tags }}-ppc64le - # annotate - docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-amd64 --arch amd64 - docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-arm64 --arch arm64 - docker manifest annotate ${{ steps.docker_meta.outputs.tags }} ${{ steps.docker_meta.outputs.tags }}-ppc64le --arch ppc64le - # push - docker manifest push ${{ steps.docker_meta.outputs.tags }} + docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.tags }} \ + ${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.tags }}-amd64 \ + ${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.tags }}-arm64 \ + ${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.tags }}-ppc64le diff --git a/.github/workflows/static-scan.yml b/.github/workflows/static-scan.yml index cf4029e1e..b92b32a67 100644 --- a/.github/workflows/static-scan.yml +++ b/.github/workflows/static-scan.yml @@ -6,25 +6,25 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: "1.20" - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: run make lint run: make lint shellcheck: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master hadolint: runs-on: ubuntu-latest name: Hadolint steps: - - uses: actions/checkout@v2 - - uses: brpaz/hadolint-action@v1.2.1 + - uses: actions/checkout@v3 + - uses: hadolint/hadolint-action@v3.1.0 name: Run Hadolint with: dockerfile: Dockerfile