-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.59 KB
/
opensearch-snapshots.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
# This workflow will check out, build, and publish snapshots of OpenSearch Core.
name: OpenSearch snapshots
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
ref:
description:
required: false
default: 'main'
jobs:
publish-snapshots:
if: github.repository == 'lucenia/snapshots'
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Checkout build repo
uses: actions/checkout@v4
with:
repository: lucenia/build
ref: main
path: lucenia-build
- name: Copy settings.xml
run: |
cp lucenia-build/maven/settings.xml ~/.m2/
- name: Checkout OpenSearch Core
uses: actions/checkout@v4
with:
repository: 'opensearch/opensearch-project'
path: opensearch
ref: ${{ github.event.inputs.ref }}
- name: Publish OpenSearch to local maven repo.
working-directory: ./opensearch
run: ./gradlew publishToMavenLocal
- name: Publish lucene opensearch to github packages
env:
USERNAME: ${{ secrets.SNAPSHOTS_USER }}
ACCESS_TOKEN: ${{ secrets.SNAPSHOTS_TOKEN }}
run: |
bash lucenia-build/scripts/gradle/publish-to-github-packages.sh ~/.m2/repository/ lucenia snapshots github