From e2f59f101b1e002d41126c6fb44ba26824284b67 Mon Sep 17 00:00:00 2001 From: Diego Fernandes <68125270+DiegoFernandesQA@users.noreply.github.com> Date: Tue, 14 Sep 2021 12:16:58 -0300 Subject: [PATCH 1/3] Create main.yml --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..30a4bc1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From 19b585c1047a46558dff8887c3bdda680a5ec2bc Mon Sep 17 00:00:00 2001 From: Diego Fernandes <68125270+DiegoFernandesQA@users.noreply.github.com> Date: Tue, 14 Sep 2021 12:18:03 -0300 Subject: [PATCH 2/3] Update main.yml --- .github/workflows/main.yml | 45 +++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30a4bc1..1860401 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,36 +1,31 @@ -# This is a basic workflow to help you get started with Actions +name: 2 - Formulas Scheduler (Secrets) -name: CI - -# Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - pull_request: - branches: [ main ] - - # Allows you to run this workflow manually from the Actions tab + schedule: + - cron: "0 12 * * *" workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! + - name: Setup Python Version + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Ritchie Installation & Initialization + run: | + curl -fsSL https://commons-repo.ritchiecli.io/install.sh | bash + echo '{"addCommons":false, "sendMetrics":false, "runType":"local"}' | rit init --stdin - # Runs a set of commands using the runners shell - - name: Run a multi-line script + - name: Ritchie Formula Get Github User (Python) Execution + env: + USERNAME_DEMO: ${{ secrets.USERNAME_DEMO }} + USERNAME_CREDENTIAL: ${{ secrets.USERNAME_CREDENTIAL }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - echo Add other actions to build, - echo test, and deploy your project. + rit add repo --provider="Github" --name="formulas-github" --repoUrl="https://github.com/GuillaumeFalourd/formulas-github" --priority=1 + rit set credential --provider=github --fields=username,token --values="$USERNAME_CREDENTIAL","$GITHUB_TOKEN" + rit github get user --rit_github_username="$USERNAME_DEMO" --rit_repo_details="no" --rit_keep_file="no" From 61ca834c5cf2042de7f90cef72908cc0b68e1ede Mon Sep 17 00:00:00 2001 From: Diego Fernandes <68125270+DiegoFernandesQA@users.noreply.github.com> Date: Tue, 14 Sep 2021 12:19:51 -0300 Subject: [PATCH 3/3] Update main.yml --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1860401..d471b2f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,10 @@ name: 2 - Formulas Scheduler (Secrets) on: - schedule: - - cron: "0 12 * * *" - workflow_dispatch: + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: