Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
Signed-off-by: Roshan <[email protected]>
  • Loading branch information
csengineer1990 authored Nov 20, 2024
2 parents 96771e4 + fa3043c commit 9f5a6b7
Show file tree
Hide file tree
Showing 69 changed files with 2,478 additions and 389 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/community_member_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Let's recognize <@github-username> as a contributor and community member by crea
- GitHub: <!-- username only -->
- Twitter: <!-- handle only -->
- LinkedIn: <!-- <profilename> only https://www.linkedin.com/in/<profilename> -->
- Layer5 Cloud: <!-- <user ID> only UUID https://meshery.layer5.io/user/<uuid> -->
- Layer5 Cloud: <!-- <user ID> only UUID https://cloud.layer5.io/user/<uuid> -->
- Link to profile picture:

A detailed explanation on how to set up a community member profile can be found in the [CONTRIBUTING.md](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md)
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/feature-list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Feature List

on:
workflow_dispatch:
inputs:
spreadsheet_uri:
description: 'Link of the spreadsheet containing subscription details.'
type: string
required: true
schedule:
- cron: '0 0 * * *'

permissions:
contents: write
actions: read

jobs:
trigger-feature-list:
runs-on: ubuntu-latest
env:
FEATURES_FILE: 'feature_data.json'

steps:
- name: Checkout current repository
uses: actions/checkout@v4

- name: Restore cache
id: cache-sha
uses: actions/cache@v3
with:
path: .sha-cache
key: feature-data-sha
restore-keys: |
feature-data-sha
- name: Check for updates in source repository
id: check-updates
uses: actions/github-script@v7
with:
script: |
const { data: sourceFile } = await github.rest.repos.getContent({
owner: 'layer5labs',
repo: 'meshery-extensions-packages',
path: 'feature_data.json',
ref: 'master'
});
// Store the latest commit SHA
const latestSHA = sourceFile.sha;
const fs = require('fs');
// Check if we have a previous SHA
let hasUpdates = true;
const shaCachePath = '.sha-cache/latest-sha';
if (fs.existsSync(shaCachePath)) {
const lastSHA = fs.readFileSync(shaCachePath, 'utf8');
hasUpdates = lastSHA !== latestSHA;
}
if (hasUpdates) {
// Save the new SHA
fs.mkdirSync('.sha-cache', { recursive: true });
fs.writeFileSync(shaCachePath, latestSHA);
// Decode and save the content
const content = Buffer.from(sourceFile.content, 'base64').toString('utf8');
// Write the new content
fs.writeFileSync(process.env.FEATURES_FILE, content);
core.setOutput('has-updates', 'true');
} else {
core.setOutput('has-updates', 'false');
}
- name: Commit changes
if: steps.check-updates.outputs.has-updates == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Updated feature data from source repository"
file_pattern: ${{ env.FEATURES_FILE }}
branch: master
commit_options: "--signoff"
commit_user_name: l5io
commit_user_email: [email protected]
commit_author: 'l5io <[email protected]>'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ alt="Nighthawk" align="left" />


<p style="clear:both;">
<h2><a href="https://meshery.layer5.io/catalog">Meshery Catalog</a></h2>
<h2><a href="https://cloud.layer5.io/catalog">Meshery Catalog</a></h2>
<a href="">
<img src=".github/assets/images/catalog/catalog.svg"
style="float:left;margin:10px;" width="125px"
Expand Down
Loading

0 comments on commit 9f5a6b7

Please sign in to comment.