Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Jan 13, 2021
1 parent bd79cb6 commit d71c036
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2.3.4

- name: Retrieve tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Check if Git tag exists
id: head_tag
run: echo "::set-output name=head_tag::$(git tag --points-at HEAD)"
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/package-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,27 @@ on:
workflow_dispatch:

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
head_tag: ${{ steps.head_tag.outputs.head_tag }}
steps:
- name: Checkout
uses: actions/checkout@v2.3.4

- name: Retrieve tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Check if Git tag exists
id: head_tag
run: echo "::set-output name=head_tag::$(git tag --points-at HEAD)"
if: startsWith(github.ref, 'refs/heads/')

audit-npm:
runs-on: ubuntu-latest
needs: prepare
if: ${{ !startsWith(github.ref, 'refs/heads/') || !needs.prepare.outputs.head_tag }}

strategy:
matrix:
node_version: ["14"]
Expand All @@ -36,6 +55,9 @@ jobs:

audit-retire:
runs-on: ubuntu-latest
needs: prepare
if: ${{ !startsWith(github.ref, 'refs/heads/') || !needs.prepare.outputs.head_tag }}

strategy:
matrix:
node_version: ["14"]
Expand Down

0 comments on commit d71c036

Please sign in to comment.