-
Notifications
You must be signed in to change notification settings - Fork 499
66 lines (62 loc) · 1.93 KB
/
source_bitbucket.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
name: Source Plugin Bitbucket Workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- "plugins/source/bitbucket/**"
- ".github/workflows/source_bitbucket.yml"
push:
branches:
- main
paths:
- "plugins/source/bitbucket/**"
- ".github/workflows/source_bitbucket.yml"
jobs:
plugins-source-bitbucket:
timeout-minutes: 30
name: "plugins/source/bitbucket"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./plugins/source/bitbucket
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "20"
cache: "gradle"
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@342dbebe7272035434f9baccc29a816ec6dd2c7b
- name: Build package
run: ./gradlew build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails
with:
report_paths: "**/build/test-results/test/TEST-*.xml"
require_passed_tests: true
fail_on_failure: true
validate-release:
timeout-minutes: 10
runs-on: ubuntu-latest
env:
IMAGE_NAME_PREFIX: cloudquery
REGISTRY: ghcr.io
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@edfb0fe6204400c56fbfd3feba3fe9ad1adfa345
- name: Build and push Docker image
uses: docker/build-push-action@9f6f8c940b91232557f8699b21341a08624a8dce
with:
context: "{{defaultContext}}:plugins/source/bitbucket"
load: true
build-args: |
GITHUB_ACTOR=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}