-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (71 loc) · 2.69 KB
/
publish-smoke-test-fake-backend-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Free disk space
run: .github/scripts/gha-free-disk-space.sh
- name: Set up JDK for running Gradle
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: temurin
java-version-file: .java-version
- name: Login to GitHub package registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
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@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up JDK for running Gradle
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: temurin
java-version-file: .java-version
- name: Login to GitHub package registry
uses: azure/docker-login@15c4aadf093404726ab2ff205b2cdd33fa6d054c # v2
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@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1
- 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'
}}