Skip to content

Commit

Permalink
👷 Added lilab update
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Apr 19, 2024
1 parent 143fe22 commit 8b3f679
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/liblab_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Latest liblab updates

on:
workflow_dispatch:
schedule:
- cron: "0 11 * * *" # 11am UTC corresponds to 5am CST

jobs:
generate-sdks-and-publish-prs:
name: Generate SDKs and publish PRs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate SDKs and publish PRs
uses: liblaber/[email protected]
with:
liblab_token: ${{ secrets.LIBLAB_TOKEN }}
liblab_github_token: ${{ secrets.LIBLAB_GITHUB_TOKEN }}
22 changes: 16 additions & 6 deletions .github/workflows/sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,34 @@ on:
# Add any other triggers you want here, such as a push to the spec file
workflow_call:
workflow_dispatch:

jobs:
build-and-pr:
name: Generate SDKs and create PRs
runs-on: ubuntu-latest
if: github.run_number != 1
env:
LIBLAB_CI: true
LIBLAB_TOKEN: ${{ secrets.LIBLAB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.LIBLAB_GITHUB_TOKEN }}
environment: development
LIBLAB_GITHUB_TOKEN: ${{ secrets.LIBLAB_GITHUB_TOKEN }}
steps:
- name: Check if secrets are set
run: |
if [[ -n "${{ secrets.LIBLAB_TOKEN }}" && -n "${{ secrets.LIBLAB_GITHUB_TOKEN }}" ]]; then
echo "Secrets are set, proceeding with the workflow"
else
echo "Error: Secrets LIBLAB_TOKEN and LIBLAB_GITHUB_TOKEN are required, see https://developers.liblab.com/tutorials/integrate-with-github-actions/#create-tokens"
echo "::error::Secrets LIBLAB_TOKEN and LIBLAB_GITHUB_TOKEN are required, see https://developers.liblab.com/tutorials/integrate-with-github-actions/#create-tokens"
exit 1
fi
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18" # Specify the node version you want to use
node-version: "20"
- name: Install liblab
run: npm install -g liblab
working-directory: packages/api
- name: Start Build
run: liblab build --yes
working-directory: packages/api
Expand Down

0 comments on commit 8b3f679

Please sign in to comment.