Skip to content

Feature List

Feature List #25

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 * * *' # Runs every day at midnight UTC
permissions:
contents: write
jobs:
fetch-Feature-list:
name: Fetch Feature List
if: github.repository == 'layer5labs/meshery-extensions-packages'
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository to access local files
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Install Go (if it's not pre-installed)
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ secrets.GO_VERSION }}
# Step 3: Set environment variable for spreadsheet URL
- name: Set spreadsheet URI
run: |
if [ -n "${{ inputs.spreadsheet_uri }}" ]; then
echo "INPUT_SPREADSHEET_URI=${{ inputs.spreadsheet_uri }}" >> $GITHUB_ENV
else
echo "INPUT_SPREADSHEET_URI=https://docs.google.com/spreadsheets/d/e/2PACX-1vQwzrUSKfuSRcpkp7sJTw1cSB63s4HCjYLJeGPWECsvqn222hjaaONQlN4X8auKvlaB0es3BqV5rQyz/pub?gid=829069645&single=true&output=csv" >> $GITHUB_ENV
fi
# Step 4: Fetch and process the feature list by directly running the Go file
- name: Fetch and process feature list
run: |
go run ./.github/actions/feature-list-action/main.go
- name: Pull changes from remote
run: git pull origin master
# - name: Commit changes
# uses: stefanzweifel/git-auto-commit-action@v5
# env:
# GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
# with:
# commit_message: "Updated feature data"
# branch: master
# commit_options: "--signoff"
# file_pattern: 'feature_data.json'
# commit_user_name: l5io
# commit_user_email: [email protected]
# commit_author: 'l5io <[email protected]>'
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
commit-message: Update feature data
committer: l5io <[email protected]>
author: l5io <[email protected]>
signoff: true
branch: update-feature-data
delete-branch: true
title: '[Chore]: Update feature data'
add-paths: |
feature_data.json
body: |
This pull request updates the feature data.
_This pull request has been auto-generated by [l5io](http://github.com/l5io)_
reviewers: ${{ github.actor }}
draft: false