76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
name: Build smoke test fake backend
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'smoke-tests/fake-backend/**'
|
|
- '.github/workflows/build-smoke-dist-fakebackend.yaml'
|
|
branches: ['main']
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publishLinux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Cache gradle dependencies
|
|
uses: burrunan/gradle-cache-action@v1.10
|
|
with:
|
|
job-id: fakebackend-smoke
|
|
|
|
- name: Login to GitHub Package Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
TAG="$(date '+%Y%m%d').$GITHUB_RUN_ID"
|
|
echo "Using extra tag $TAG"
|
|
./gradlew jib -Djib.httpTimeout=120000 -Djib.console=plain -PextraTag=$TAG
|
|
working-directory: smoke-tests/fake-backend
|
|
|
|
publishWindows:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Support longpaths
|
|
run: git config --system core.longpaths true
|
|
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Cache gradle dependencies
|
|
uses: burrunan/gradle-cache-action@v1.10
|
|
with:
|
|
job-id: fakebackend-smoke
|
|
|
|
- name: Login to GitHub Package Registry
|
|
uses: azure/docker-login@v1
|
|
with:
|
|
login-server: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
TAG="$(date '+%Y%m%d').$GITHUB_RUN_ID"
|
|
echo "Using extra tag $TAG"
|
|
./gradlew dockerPush -PextraTag=$TAG
|
|
working-directory: smoke-tests/fake-backend
|