-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (41 loc) · 1.57 KB
/
fetch_latest_versions.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
name: Fetch Latest Versions
# This workflow fetches the latest 5 indexer versions from the indexer repo
# and optionally filters all already published versions
on:
workflow_call:
inputs:
autoagora-indexer-service-version:
description: 'The current autoagora-indexer-service version. If not provided, all versions will be returned.'
required: false
type: string
outputs:
versions:
description: 'Indexer versions to publish'
value: ${{ jobs.fetch-versions.outputs.tags }}
org-name:
description: 'The organization name.'
value: ${{ jobs.fetch-versions.outputs.repo-owner }}
jobs:
fetch-versions:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.get-unpublished-tags.outputs.tags }}
repo-owner: ${{ steps.to_lowercase.outputs.lowercased }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Get package owner
id: to_lowercase
uses: ./.github/actions/to_lowercase
with:
text: ${{ github.repository_owner }}
- name: Fetch unpublished tags
uses: ./.github/actions/get_unpublished_tags
id: get-unpublished-tags
with:
version: ${{ inputs.autoagora-indexer-service-version }}
org-name: ${{ steps.to_lowercase.outputs.lowercased }}
- name: Print the repo owner
run: echo "The repo owner is ${{ steps.to_lowercase.outputs.lowercased }}"
- name: Print the unpublished tags
run: echo "The unpublished tags are ${{ steps.get-unpublished-tags.outputs.tags }}"