88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
name: Publish fake backend images for smoke tests
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "smoke-tests/images/fake-backend/**"
|
|
- ".github/workflows/publish-smoke-test-fake-backend-images.yml"
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publishLinux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Free disk space
|
|
run: .github/scripts/gha-free-disk-space.sh
|
|
|
|
- name: Set up JDK for running Gradle
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17.0.6
|
|
|
|
- name: Login to GitHub package registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set tag
|
|
run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
|
|
|
- name: Build Docker image
|
|
run: ./gradlew :smoke-tests:images:fake-backend:jib -Djib.httpTimeout=120000 -Djib.console=plain -PextraTag=${{ env.TAG }}
|
|
|
|
publishWindows:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Support long paths
|
|
run: git config --system core.longpaths true
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK for running Gradle
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17.0.6
|
|
|
|
- name: Login to GitHub package registry
|
|
uses: azure/docker-login@v1
|
|
with:
|
|
login-server: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set tag
|
|
run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
|
|
|
- name: Build Docker image
|
|
run: ./gradlew :smoke-tests:images:fake-backend:dockerPush -PextraTag=${{ env.TAG }}
|
|
|
|
workflow-notification:
|
|
needs:
|
|
- publishLinux
|
|
- publishWindows
|
|
if: always()
|
|
uses: ./.github/workflows/reusable-workflow-notification.yml
|
|
with:
|
|
success: >-
|
|
${{
|
|
needs.publishLinux.result == 'success' &&
|
|
needs.publishWindows.result == 'success'
|
|
}}
|