From 83778cae951cbf51ef5f94d97b625481057b35e1 Mon Sep 17 00:00:00 2001 From: Niladri Halder Date: Tue, 25 Jul 2023 08:08:56 +0000 Subject: [PATCH] fix(ci): update github actions and OS to ubuntu-latest Signed-off-by: Niladri Halder --- .github/workflows/build.yml | 54 ++++++++++++++---------------- .github/workflows/pull_request.yml | 14 ++++---- .github/workflows/release.yml | 48 +++++++++++++------------- .gitignore | 1 + 4 files changed, 58 insertions(+), 59 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2062524..d2ca38f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Shellcheck uses: reviewdog/action-shellcheck@v1 @@ -45,10 +45,10 @@ jobs: test: # to ignore tests on release if: ${{ (github.event.ref_type != 'tag') }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set Branch run: | @@ -74,7 +74,7 @@ jobs: needs: ['lint', 'test'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set Image Org # sets the default IMAGE_ORG to openebs @@ -85,7 +85,7 @@ jobs: - name: Set Build Date id: date run: | - echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" + echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT - name: Set tag run: | @@ -99,17 +99,16 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: # add each registry to which the image needs to be pushed here images: | ${{ env.IMAGE_ORG }}/cstor-base quay.io/${{ env.IMAGE_ORG }}/cstor-base ghcr.io/${{ env.IMAGE_ORG }}/cstor-base - tag-latest: false - tag-custom-only: true - tag-custom: | - ${{ env.TAG }} + tags: | + type=raw,value=latest,enable=false + type=raw,value=${{ env.IMAGE_TAG }} - name: Print Tag info run: | @@ -117,7 +116,7 @@ jobs: echo "${{ steps.docker_meta.outputs.tags }}" - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all @@ -133,27 +132,27 @@ jobs: version: v0.5.1 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Quay - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} - name: Login to GHCR - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build & Push Image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/cstor-base.Dockerfile @@ -173,7 +172,7 @@ jobs: needs: ['lint', 'cstor-base'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set Image Org # sets the default IMAGE_ORG to openebs @@ -184,7 +183,7 @@ jobs: - name: Set Build Date id: date run: | - echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" + echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT - name: Set tag run: | @@ -198,17 +197,16 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: # add each registry to which the image needs to be pushed here images: | ${{ env.IMAGE_ORG }}/cstor-pool quay.io/${{ env.IMAGE_ORG }}/cstor-pool ghcr.io/${{ env.IMAGE_ORG }}/cstor-pool - tag-latest: false - tag-custom-only: true - tag-custom: | - ${{ env.TAG }} + tags: | + type=raw,value=latest,enable=false + type=raw,value=${{ env.IMAGE_TAG }} - name: Print Tag info run: | @@ -216,38 +214,38 @@ jobs: echo "${{ steps.docker_meta.outputs.tags }}" - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 with: version: v0.5.1 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Quay - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} - name: Login to GHCR - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build & Push Image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/cstor.Dockerfile diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f2655ef..83d6543 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Shellcheck uses: reviewdog/action-shellcheck@v1 @@ -42,10 +42,10 @@ jobs: pattern: '*.sh' test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set Branch run: | @@ -72,10 +72,10 @@ jobs: needs: ['lint'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all @@ -86,12 +86,12 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 with: version: v0.5.1 - name: Build Image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/cstor-base.Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1813af9..595d748 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Set Image Org # sets the default IMAGE_ORG to openebs @@ -36,7 +36,7 @@ jobs: - name: Set Build Date id: date run: | - echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" + echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT - name: Set Tag run: | @@ -51,16 +51,16 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: # add each registry to which the image needs to be pushed here images: | ${{ env.IMAGE_ORG }}/cstor-base quay.io/${{ env.IMAGE_ORG }}/cstor-base ghcr.io/${{ env.IMAGE_ORG }}/cstor-base - tag-latest: true - tag-semver: | - {{version}} + tags: | + type=raw,value=latest,enable=true + type=raw,value={{version}} - name: Print Tag info run: | @@ -68,38 +68,38 @@ jobs: echo "RELEASE TAG: ${RELEASE_TAG}" - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 with: version: v0.5.1 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Quay - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} - name: Login to GHCR - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build & Push Image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/cstor-base.Dockerfile @@ -119,7 +119,7 @@ jobs: needs: ['cstor-base'] steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Set Image Org # sets the default IMAGE_ORG to openebs @@ -130,7 +130,7 @@ jobs: - name: Set Build Date id: date run: | - echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" + echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT - name: Set Tag run: | @@ -140,16 +140,16 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v4 with: # add each registry to which the image needs to be pushed here images: | ${{ env.IMAGE_ORG }}/cstor-pool quay.io/${{ env.IMAGE_ORG }}/cstor-pool ghcr.io/${{ env.IMAGE_ORG }}/cstor-pool - tag-latest: true - tag-semver: | - {{version}} + tags: | + type=raw,value=latest,enable=true + type=raw,value={{version}} - name: Print Tag info run: | @@ -157,38 +157,38 @@ jobs: echo "RELEASE TAG: ${RELEASE_TAG}" - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: all - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 with: version: v0.5.1 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Quay - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} - name: Login to GHCR - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build & Push Image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . file: ./docker/cstor.Dockerfile diff --git a/.gitignore b/.gitignore index a50ea10..3b9bbdb 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,5 @@ config.* compile depcomp aclocal.m4 +**/.idea