Skip to content

Commit

Permalink
ci: bump github workflow action versions (#31)
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinandan Purkait <[email protected]>
Co-authored-by: Abhinandan Purkait <[email protected]>
  • Loading branch information
Abhinandan-Purkait and Abhinandan Purkait authored Mar 21, 2024
1 parent d903da6 commit edeb331
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 34 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand All @@ -40,59 +40,58 @@ 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: 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 }}/linux-utils
quay.io/${{ env.IMAGE_ORG }}/linux-utils
ghcr.io/${{ env.IMAGE_ORG }}/linux-utils
tag-latest: false
tag-custom-only: true
tag-custom: |
${{ env.TAG }}
tags: |
type=raw,value=latest,enable=false
type=raw,value=${{ env.TAG }}
- name: Print Tags
run: |
echo "${{ steps.docker_meta.outputs.tags }}"
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: v0.5.1
version: v0.13.1

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay
uses: docker/login-action@v1
uses: docker/login-action@v3
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@v3
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@v5
with:
file: ./Dockerfile
push: true
Expand All @@ -109,7 +108,7 @@ jobs:
needs: ['linux-utils']
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: v0.5.1
version: v0.13.1

- name: Build Image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
push: false
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
Expand All @@ -39,59 +39,58 @@ 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: 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 }}/linux-utils
quay.io/${{ env.IMAGE_ORG }}/linux-utils
ghcr.io/${{ env.IMAGE_ORG }}/linux-utils
tag-latest: true
tag-semver: |
{{version}}
tags: |
type=semver,pattern={{version}}
- name: Print Tags
run: |
echo "${{ steps.docker_meta.outputs.tags }}"
echo "RELEASE TAG: ${RELEASE_TAG}"
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: v0.5.1
version: v0.13.1

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Quay
uses: docker/login-action@v1
uses: docker/login-action@v3
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@v3
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@v5
with:
file: ./Dockerfile
push: true
Expand All @@ -109,7 +108,7 @@ jobs:
needs: ['linux-utils']
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set Release Tag
run: |
Expand Down

0 comments on commit edeb331

Please sign in to comment.