Skip to content

Commit

Permalink
Updates workflows and activities
Browse files Browse the repository at this point in the history
  • Loading branch information
CalinL committed Sep 7, 2023
1 parent eec13b4 commit 5025ef8
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/actions/cat-facts/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def select_random_fact(fact_arr):
print(random_fact)

# Set the fact-output of the action as the value of random_fact
print(f"::set-output name=fact::{random_fact}")
print(f"fact={random_fact}")
2 changes: 1 addition & 1 deletion .github/actions/hello-world-composite-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
- run: echo Hello from composite action ${{ inputs.who-to-greet }}.
shell: bash
- id: random-number-generator
run: echo "::set-output name=random-id::$(echo $RANDOM)"
run: echo "random-id=$(echo $RANDOM)" >> $GITHUB_OUTPUT
shell: bash
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/hello-world-js/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: "my hello action JS"
description: "say hello with GitHub Actions"

runs:
using: "node12"
using: "node16"
main: "dist/index.js"
2 changes: 1 addition & 1 deletion .github/actions/issue-maker-js/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ inputs:
description: "Token with permissions to do repo things"

runs:
using: "node12"
using: "node16"
main: "dist/index.js"
2 changes: 1 addition & 1 deletion .github/actions/joke-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ outputs:
description: The resulting joke from the icanhazdadjokes API

runs:
using: "node12"
using: "node16"
main: "dist/index.js"
2 changes: 1 addition & 1 deletion .github/workflows/gh-actions-usage-report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 00. GitHub Actions Usage Report
name: 00. GitHub Actions Usage Report (WIP)

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/greet-everyone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# This step uses GitHub's hello-world-javascript-action:
# https://github.com/actions/hello-world-javascript-action
- name: Hello world
uses: actions/hello-world-javascript-action@v1
uses: actions/hello-world-javascript-action@main
with:
who-to-greet: "${{ github.event.inputs.name }}${{ inputs.name }}"
id: hello
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review-pending-deployments.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 03-2. Review Pending Deployments
name: 03-2. Review Pending Deployments (WIP)
on:
workflow_dispatch:
inputs:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
- [GitHub Blog](https://github.blog/)
- [Awesome Actions](https://github.com/sdras/awesome-actions)

### Adopting GitHub Actions at scale
### GitHub self-hosted runners on Kubernetes
- [Autoscaling with self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)
- [Adopting GitHub Actions at scale](https://www.youtube.com/playlist?list=PL0lo9MOBetEEk9gIFox8EbCf1Co_4ppIO)
- [actions-at-scale-ghoh](https://github.com/Link-/actions-at-scale-ghoh)
- [actions-runner-controller](https://github.com/actions-runner-controller/actions-runner-controller)
- [actions-runner-controller - A Kubernetes controller for GitHub Actions self-hosted runners.](https://github.com/actions-runner-controller/actions-runner-controller)
- [GitHub Self-Hosted Runner Autoscaling with Kubernetes]https://tgrall.github.io/blog/2022/10/16/github-self-hosted-runner-autoscaling-with-kubernetes)
- [GitHub Actions: Dive into actions-runner-controller (ARC)](https://www.youtube.com/watch?v=_F5ocPrv6io)

### Actions Changelog
- [Changelog](https://github.blog/changelog/label/actions/)
Expand Down
4 changes: 2 additions & 2 deletions labs/lab01.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ References:
```YAML
# This step uses GitHub's hello-world-javascript-action: https://github.com/actions/hello-world-javascript-action
- name: Hello world
uses: actions/hello-world-javascript-action@v1
uses: actions/hello-world-javascript-action@main
with:
who-to-greet: "Mona the Octocat"
id: hello
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
run: echo "### Hello world! :rocket:" >> "$GITHUB_STEP_SUMMARY"
# This step uses GitHub's hello-world-javascript-action: https://github.com/actions/hello-world-javascript-action
- name: Hello world
uses: actions/hello-world-javascript-action@v1
uses: actions/hello-world-javascript-action@main
with:
who-to-greet: "Mona the Octocat"
id: hello
Expand Down
4 changes: 2 additions & 2 deletions labs/lab03.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ References:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- name: Hello world action with secrets
uses: actions/hello-world-javascript-action@v1
uses: actions/hello-world-javascript-action@main
with: # Set the secret as an input
who-to-greet: ${{ secrets.MY_REPO_SECRET }}
env: # Or as an environment variable
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- name: Hello world action with secrets
uses: actions/hello-world-javascript-action@v1
uses: actions/hello-world-javascript-action@main
with: # Set the secret as an input
who-to-greet: ${{ secrets.MY_REPO_SECRET }}
env: # Or as an environment variable
Expand Down
4 changes: 4 additions & 0 deletions labs/lab04.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ on:
name: 02-2. Dependencies
on:
workflow_dispatch:
push:
branches:
- main
workflow_call:
jobs:
Expand Down
12 changes: 6 additions & 6 deletions labs/lab05.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ References:
2. Edit the file and copy the following YAML content at the end of the file:
```YAML
- name: Hello world
uses: actions/hello-world-javascript-action@v1
uses: actions/hello-world-javascript-action@main
with:
who-to-greet: "${{ inputs.who-to-greet }}"
id: hello
Expand All @@ -54,7 +54,7 @@ References:
runs-on: ubuntu-latest
name: A job2 to say hello
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- id: hello-world
uses: ./.github/actions/hello-world-composite-action
with:
Expand Down Expand Up @@ -163,12 +163,12 @@ runs:
- run: echo Hello from composite action ${{ inputs.who-to-greet }}.
shell: bash
- id: random-number-generator
run: echo "::set-output name=random-id::$(echo $RANDOM)"
run: echo "random-id=$(echo $RANDOM)" >> $GITHUB_OUTPUT
shell: bash
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- name: Hello world
uses: actions/hello-world-javascript-action@v1
uses: actions/hello-world-javascript-action@main
with:
who-to-greet: "${{ inputs.who-to-greet }}"
id: hello
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
runs-on: ubuntu-latest
name: A job2 to say hello
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- id: hello-world
uses: ./.github/actions/hello-world-composite-action
with:
Expand Down Expand Up @@ -278,4 +278,4 @@ jobs:
issueTitle: "A cat fact for you from ${{ github.repository_owner }}"
```
</details>
</details>

0 comments on commit 5025ef8

Please sign in to comment.