Skip to content

chore(deps): bump pl.allegro.tech.build.axion-release in /backend #2419

chore(deps): bump pl.allegro.tech.build.axion-release in /backend

chore(deps): bump pl.allegro.tech.build.axion-release in /backend #2419

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Backend Build and Publish Docker Image
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x ./backend/gradlew
- name: Build with Gradle
run: ./backend/gradlew -p ./backend build --stacktrace
docker:
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
needs: build
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
# - name: Login to GitHub Packages Docker Registry
# uses: docker/login-action@v3
# with:
# registry: docker.pkg.github.com
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GH_PACKAGES_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Grant execute permission for gradlew
run: chmod +x ./backend/gradlew
- name: Retrieve branch or tag name
id: refvar
run: echo "::set-output name=gitRefName::${GITHUB_REF#refs/*/}"
### Docker Hub
- name: Push API Docker image (tag) to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
run: ./backend/gradlew -p ./backend :dev-feed-api:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-api:${{ steps.refvar.outputs.gitRefName }}"
- name: Push latest API Docker image (master) to Docker Hub
if: github.ref == 'refs/heads/master'
run: ./backend/gradlew -p ./backend :dev-feed-api:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-api:latest"
- name: Push discoverdev.io crawler Docker image (tag) to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
run: ./backend/gradlew -p ./backend :crawlers:dev-feed-crawler-discoverdev_io:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-crawler-discoverdev_io:${{ steps.refvar.outputs.gitRefName }}"
- name: Push latest discoverdev.io Docker image (master) to Docker Hub
if: github.ref == 'refs/heads/master'
run: ./backend/gradlew -p ./backend :crawlers:dev-feed-crawler-discoverdev_io:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-crawler-discoverdev_io:latest"
- name: Push engineeringblogs.xyz crawler Docker image (tag) to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
run: ./backend/gradlew -p ./backend :crawlers:dev-feed-crawler-engineeringblogs_xyz:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-crawler-engineeringblogs_xyz:${{ steps.refvar.outputs.gitRefName }}"
- name: Push latest engineeringblogs.xyz Docker image (master) to Docker Hub
if: github.ref == 'refs/heads/master'
run: ./backend/gradlew -p ./backend :crawlers:dev-feed-crawler-engineeringblogs_xyz:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-crawler-engineeringblogs_xyz:latest"
- name: Push rm3l.org crawler Docker image (tag) to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
run: ./backend/gradlew -p ./backend :crawlers:dev-feed-crawler-rm3l_org:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-crawler-rm3l_org:${{ steps.refvar.outputs.gitRefName }}"
- name: Push latest rm3l.org Docker image (master) to Docker Hub
if: github.ref == 'refs/heads/master'
run: ./backend/gradlew -p ./backend :crawlers:dev-feed-crawler-rm3l_org:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed-crawler-rm3l_org:latest"
# Legacy image is kept for backward compatibility, and will get removed in a near future
- name: Push API Docker legacy image (tag) to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
run: ./backend/gradlew -p ./backend :dev-feed-api:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed:${{ steps.refvar.outputs.gitRefName }}"
- name: Push latest API legacy Docker image (master) to Docker Hub
if: github.ref == 'refs/heads/master'
run: ./backend/gradlew -p ./backend :dev-feed-api:jib -Djib.to.image="registry.hub.docker.com/rm3l/dev-feed:latest"