Skip to content

Commit

Permalink
Updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
this-Aditya committed Mar 8, 2024
1 parent 41ba20b commit 678d9c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
java-version: 17

- name: Cache
uses: actions/cache@v2.0.0
uses: actions/cache@v3
with:
# Cache gradle directories
path: |
Expand Down Expand Up @@ -56,31 +56,31 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

# Add Docker labels and tags
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v2
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_IMAGE }}

# Setup docker build environment
- 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: Cache Docker layers
id: cache-buildx
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile', '**/*.gradle.kts', 'gradle.properties', 'src/main/**') }}
Expand All @@ -95,7 +95,7 @@ jobs:
echo "::set-output name=cache-to::type=local,dest=/tmp/.buildx-cache-new,mode=max"
fi
- name: Build docker
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: ${{ steps.cache-parameters.outputs.cache-to }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
java-version: 17

- name: Cache
uses: actions/cache@v2.0.0
uses: actions/cache@v3
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
Expand Down Expand Up @@ -53,32 +53,32 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Setup docker build environment
- 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 DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Add Docker labels and tags
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v2
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_IMAGE }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build docker
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
# Allow running the image on the architectures supported by openjdk:17-jre-slim
platforms: linux/amd64,linux/arm64
Expand Down

0 comments on commit 678d9c2

Please sign in to comment.