This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set the Auto-Collector to be triggered periodically (#90)
* Periodical collect (#87) * -Change logic, collect useful versions in manifest file -add periodically collect time * Periodical collect (#88) * Changed the code structure and pr description (#89)
- Loading branch information
Showing
7 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
name: auto-collector | ||
jobs: | ||
auto-createPR: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Launch auto-collector periodically | ||
run: make collect | ||
- name: Run read-yaml action | ||
id: yaml-data | ||
uses: CumulusDS/[email protected] | ||
with: | ||
file: ./EdgeXConfig/manifest.yaml | ||
updated: updated | ||
- name: Display read-yaml output | ||
run: | | ||
echo "${{ steps.yaml-data.outputs.updated }}" | ||
- name: Create Pull Request | ||
if: ${{ steps.yaml-data.outputs.updated == 'true' }} | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
commit-message: discover edgex new version | ||
title: "[auto-collector] Discover edgex new version" | ||
body: > | ||
This PR is auto-generated by github action,please check and merge the config file in time. | ||
labels: auto-collector, automated pr | ||
branch: auto-collector-generated-branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
updated: "false" | ||
count: 4 | ||
latestVersion: kamakura | ||
versions: | ||
- jakarta | ||
- kamakura | ||
- ireland | ||
- hanoi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,4 @@ emqx/kuiper:1.1.1-alpine | |
postgres:12.3-alpine | ||
vault:1.5.3 | ||
kong:2.0.5 | ||
kong:2.0.5 | ||
redis:6.0.9-alpine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package edgex | ||
|
||
type Manifest struct { | ||
Updated string `yaml:"updated"` | ||
Count int `yaml:"count"` | ||
LatestVersion string `yaml:"latestVersion"` | ||
Versions []string `yaml:"versions"` | ||
} | ||
|
||
func NewManifest() *Manifest { | ||
manifest := &Manifest{ | ||
Updated: "false", | ||
Count: 0, | ||
LatestVersion: "", | ||
Versions: make([]string, 0), | ||
} | ||
return manifest | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters