From c984c92eabbe6d7003d07a87855be85169016c2a Mon Sep 17 00:00:00 2001 From: frudisch Date: Tue, 10 Sep 2024 20:19:15 +0200 Subject: [PATCH] Update entry to directly jump to the single lessons --- .github/workflow/issue_trigger.yaml | 11 +++++++++ 0_basics_cicd.md | 21 ++++++++++------- 4_composite_actions.md | 35 +++++++++++++++++++++++++++-- README.md | 10 ++++++++- 4 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 .github/workflow/issue_trigger.yaml diff --git a/.github/workflow/issue_trigger.yaml b/.github/workflow/issue_trigger.yaml new file mode 100644 index 0000000..8d627fc --- /dev/null +++ b/.github/workflow/issue_trigger.yaml @@ -0,0 +1,11 @@ +name: Advanced action skills +on: + issue_comment: +jobs: + deploy: + if: contains(github.event.comment.body, '/deploy') + runs-on: ubuntu-latest + steps: + - name: Run on deploy comment + run: | + echo "This is executed from the main branch" \ No newline at end of file diff --git a/0_basics_cicd.md b/0_basics_cicd.md index 698c79f..063587f 100644 --- a/0_basics_cicd.md +++ b/0_basics_cicd.md @@ -1,12 +1,17 @@ -# Overview of CI/CD +# Github Actions -Importance of CI/CD in modern software development. -Introduction to GitHub Actions as a CI/CD tool. -Goals for the Workshop: +GitHub Actions is a robust and flexible build and deployment system that supports a wide range of use cases, from simple CI pipelines to complex, multi-environment deployment strategies, making it a valuable tool in modern DevOps practices. -Understanding the basics of GitHub Actions. -Creating and running workflows. -Setting up self-hosted runners for on-premises infrastructure. -Implementing advanced workflows, caching, and secrets management. +* CI/CD Integration + +* YAML-Based Workflow Configuration + +* Multi-Language Support + +* Flexible Triggers + +* Secrets Management + +* Self-Hosted and GitHub-Hosted Runners [next >>](./1_basic_github_actions.md) \ No newline at end of file diff --git a/4_composite_actions.md b/4_composite_actions.md index 5aed861..8845715 100644 --- a/4_composite_actions.md +++ b/4_composite_actions.md @@ -35,7 +35,38 @@ runs: ### Using composite action ``.github/workflows/example.yaml`` ```yaml - +jobs: + greet-randomize: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - id: greet-and-randomize + uses: ./.github/actions/greet-and-randomize + with: + who-to-greet: 'Hack&Heat' + - run: echo random-number "$RANDOM_NUMBER" + shell: bash + env: + RANDOM_NUMBER: ${{ steps.greet-and-randomize.outputs.random-number }} ``` -## Creating complex actions \ No newline at end of file +## Creating complex actions + +-> https://github.com/senacor/workshop-github-action-action + +### Integration + +```yaml + greet-randomize-external: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - id: greet-and-randomize + uses: senacor/workshop-github-action-action@v1.0.1 + with: + who-to-greet: 'Hack&Heat' + - run: echo random-number "$RANDOM_NUMBER" + shell: bash + env: + RANDOM_NUMBER: ${{ steps.greet-and-randomize.outputs.random-number }} +``` \ No newline at end of file diff --git a/README.md b/README.md index f38ea48..87a4688 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # Workshop first steps and best practices Github Actions -[Entrance here >>](./0_basics_cicd.md) \ No newline at end of file +[Entrance here >>](./0_basics_cicd.md) + +[Basics >>](./1_basic_github_actions.md) + +[Intermediate >>](./2_intermediate_github_actions.md) + +[Advanced >>](./3_advanced_github_actions.md) + +[Composite Actions >>](./4_composite_actions.md) \ No newline at end of file