Skip to content

Commit

Permalink
Merge pull request #86 from TerrenceMcGuinness-NOAA/feature_1643_badges
Browse files Browse the repository at this point in the history
Feature 1643 badges
  • Loading branch information
TerrenceMcGuinness-NOAA committed May 31, 2023
2 parents 87923b7 + dee854a commit d3770d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 32 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/hello.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ on:
branches:
- develop_badgetest
types: [closed]

#env:
# SOME_VAR: bla_bla_bla
# ANOTHER_VAR: stuff_stuff


jobs:

print:
runs-on: ubuntu-latest
outputs:
Expand All @@ -27,11 +24,6 @@ jobs:
echo "some_var=$SOME_VAR" >> $GITHUB_OUTPUT
echo "another var: $ANOTHER_VAR"
echo "another_var=$ANOTHER_VAR" >> $GITHUB_OUTPUT
echo "some var: $SOME_VAR"
echo "some_var=$SOME_VAR" >> $GITHUB_ENV
echo "another var: $ANOTHER_VAR"
echo "another_var=$ANOTHER_VAR" >> $GITHUB_ENV
passed:
runs-on: ubuntu-latest
Expand All @@ -48,6 +40,3 @@ jobs:
env:
input_var: ${{ needs.print.outputs.some_var }}
another_input_var: ${{ needs.print.outputs.another_var }}
input_var_env: ${{ needs.print.env.some_var }}
another_input_var_env: ${{ needs.print.env.another_var }}

36 changes: 17 additions & 19 deletions .github/workflows/hera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
types: [closed]

jobs:

get_labels:
runs-on: ubuntu-latest
outputs:
Expand All @@ -18,16 +19,27 @@ jobs:
run: |
labels="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" >> $GITHUB_OUTPUT
echo "$labels"
echo "test=foo" >> $GITHUB_OUTPUT
echo "test=foo" >> $GITHUB_ENV
echo "test=$FOO" >> $GITHUB_OUTPUT
env:
test: foo_bar
FOO: foobar
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}



test:
runs-on: ubuntu-latest
needs:
- get_labels

steps:
- name: Test
run: |
echo "labels: $labels"
echo "test: $test"
env:
labels: ${{ needs.get_labels.outputs.labels }}
test: ${{ needs.get_labels.outputs.test }}

passed:
runs-on: ubuntu-latest
Expand All @@ -46,20 +58,6 @@ jobs:
label: Hera
message: Passed
color: green

test:
runs-on: ubuntu-latest
needs:
- get_labels

steps:
- name: Test
run: |
echo "labels: $labels"
echo "test: $test"
env:
labels: ${{ needs.get_labels.outputs.labels }}
test: ${{ needs.get_labels.outputs.test }}

pending:
if: "!contains(steps.pending1.env.labels, 'CI-Hera-Passed') && ${{ github.event.pull_request.merged == true }}"
Expand Down

0 comments on commit d3770d4

Please sign in to comment.