Skip to content

Instantly share code, notes, and snippets.

View weibeld's full-sized avatar

Daniel Weibel weibeld

View GitHub Profile
@weibeld
weibeld / 08-env-vars.yml
Created August 1, 2020 11:56
GitHub Actions example workflow — Env Vars
name: env-vars
on: workflow_dispatch
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: step-1
run: echo "::set-env name=IP_ADDRESS::$(curl -s ifconfig.me)"
- name: step-2
run: echo "$IP_ADDRESS"
@weibeld
weibeld / 07-conditionals-6.yml
Created August 1, 2020 10:41
GitHub Actions example workflow — Conditionals 6
name: conditionals-6
on:
issues:
types: [opened]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: handle-all-issues
run: echo "This step runs for all issues"
@weibeld
weibeld / 07-conditionals-5.yml
Created August 1, 2020 10:05
GitHub Actions example workflow — Conditionals 5
name: conditionals-5
on: workflow_dispatch
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- if: true
name: step-1
run: echo "Step 1"
- if: 1 == 1
@weibeld
weibeld / 07-conditionals-3.yml
Created August 1, 2020 09:47
GitHub Actions example workflow — Conditionals 3 + 4
name: conditionals-3
on: workflow_dispatch
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: step-1
run: echo "Step 1"
- name: step-2
run: echo "Step 2"
@weibeld
weibeld / 07-conditionals-2.yml
Last active August 1, 2020 09:46
GitHub Actions example workflow — Conditionals 2
name: conditionals-2
on: workflow_dispatch
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: step-1
run: echo "Step 1"
- name: step-2
run: exit 1
@weibeld
weibeld / 07-conditionals-1.yml
Created July 31, 2020 12:50
GitHub Actions example workflow — Conditionals 1
name: conditionals-1
on: workflow_dispatch
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: step-1
run: echo "Step 1"
- name: step-2
run: exit 1
@weibeld
weibeld / 06-secrets.yml
Created July 31, 2020 12:02
GitHub Actions example workflow — Secrets
name: secrets
on: workflow_dispatch
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: my-step
run: echo "${{ secrets.MY_SECRET }}"
@weibeld
weibeld / 05-repository-dispatch-2.yml
Created July 31, 2020 11:20
GitHub Actions example workflow — Repository Dispatch 2
name: repository-dispatch-2
on:
repository_dispatch:
types: [my-type]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: my-step
run: |
@weibeld
weibeld / 05-repository-dispatch.yml
Created July 31, 2020 10:35
GitHub Actions example workflow — Repository Dispatch
name: repository-dispatch
on:
repository_dispatch:
types: [my-type]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: my-step
run: echo "Hello World!"
@weibeld
weibeld / 04-workflow-dispatch.yml
Created July 31, 2020 09:58
GitHub Actions example workflow — Workflow Dispatch
name: workflow-dispatch
on: workflow_dispatch
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: my-step
run: echo "Hello World!"