Merge pull request #12020 from dragon-slayer875/master #34
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
name: Mesheryctl | |
on: | |
push: | |
branches: | |
- "master" | |
paths: | |
- "mesheryctl/**" | |
pull_request: | |
branches: | |
- "master" | |
paths: | |
- "mesheryctl/**" | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: "Log level" | |
required: true | |
default: "warning" | |
jobs: | |
golangci: | |
name: golangci-lint | |
if: github.repository == 'meshery/meshery' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
working-directory: mesheryctl | |
args: --timeout 10m --verbose | |
skip-cache: true | |
mesheryctl_build: | |
name: Mesheryctl build & release | |
if: github.repository == 'meshery/meshery' | |
runs-on: macos-latest | |
needs: [golangci] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
- name: Setup Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: goreleaser WITHOUT tag | |
uses: goreleaser/goreleaser-action@v5 | |
if: success() && startsWith(github.ref, 'refs/tags/') == false | |
env: | |
RELEASE_CHANNEL: "edge" | |
with: | |
version: latest | |
args: release --snapshot --skip-publish --clean | |
mesheryctl_docs: | |
if: "always() && github.event_name != 'pull_request' && github.repository == 'meshery/meshery' " | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Skip if needed | |
run: | | |
echo "this is it ${{ needs.SkipIfNeeded.outputs.skipdocupdate }} " | |
if [ "${{github.event_name }}" == "push" ];then | |
echo "version=edge" >> $GITHUB_ENV | |
fi | |
if [ "${{github.event_name }}" == "release" ];then | |
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
fi | |
- uses: actions/checkout@v4 | |
with: | |
repository: meshery/meshery | |
token: ${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
check-latest: "true" | |
- name: Run script 📜 | |
run: | | |
cd mesheryctl | |
make docs | |
- name: Pull changes from remote | |
run: git pull origin master | |
- name: Commit ✅ | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
file_pattern: docs | |
commit_user_name: l5io | |
commit_user_email: [email protected] | |
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
commit_options: "--signoff" | |
commit_message: "[Docs] Update mesheryctl docs" |