Skip to content

Instantly share code, notes, and snippets.

@ibrahimroshdy
Created July 24, 2022 10:28
Show Gist options
  • Save ibrahimroshdy/262db3b965425cc62ab95e7f0bc3a789 to your computer and use it in GitHub Desktop.
Save ibrahimroshdy/262db3b965425cc62ab95e7f0bc3a789 to your computer and use it in GitHub Desktop.
# Github workflow runner instructions using cutomized actions
name: Continuous Integration
on: [ push ]
jobs:
runner_details:
runs-on: ubuntu-latest
name: Runner Details
steps:
########## CHECK OUT REPO AND PRINT REPO INFO #######
- name: Checkout
uses: actions/checkout@v3
- name: Intro to job runner
run: |
echo "job runner details "
echo "Event: ${{ github.event_name }}"
echo "os: ${{ runner.os }} server."
echo "Repository: ${{ github.repository }}:${{ github.ref_name }}."
ls ${{ github.workspace }}
run_simple_loop:
runs-on: ubuntu-latest
name: Run Simple Loop (No Custom Action)
steps:
########## CHECK OUT REPO AND DOWNLOAD PACKAGES AND RUN CODE #######
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry and python packages
run: |
pip install poetry pyfiglet
poetry config virtualenvs.create false
poetry install
pyfiglet Continuous Integration
- name: Run Code
run: python simple_loop.py
run_simple_loop_action:
runs-on: ubuntu-latest
name: Run Custom Action
steps:
########## CHECK OUT REPO AND DOWNLOAD PACKAGES AND RUN CODE WITH CUSTOM ACTION #######
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry and python packages
uses: ./.github/actions/install-run-code
with:
project_name:
Continuous Integration [With Custom Action]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment