Skip to content

Commit

Permalink
Cherry Pick commits to fix warnings on GitHub Action (#673)
Browse files Browse the repository at this point in the history
This collects the changes of the PRs #643, #665 and #666

Bug: T322548
Co-authored-by: Guergana Tzatchkova <[email protected]>
  • Loading branch information
micgro42 and guergana authored Jan 9, 2023
1 parent e25585f commit 0748a0b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 31 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/comment-deploy-url-to-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ jobs:
name: Comment deploy URL to PR
steps:
- name: Get branch hash
id: get_hash
run: echo "::set-output name=hash::$(echo '${{ github.ref }}' | shasum | awk '{print $1}')"
run: echo "PR_HASH=$(echo '${{ github.ref }}' | shasum | awk '{print $1}')" >> $GITHUB_ENV
- name: Comment on PR
uses: thollander/[email protected]
with:
message: "<https://${{ steps.get_hash.outputs.hash }}--wmde-wikit.netlify.app>"
message: "<https://${{ env.PR_HASH }}--wmde-wikit.netlify.app>"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/document.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install
Expand Down
45 changes: 22 additions & 23 deletions .github/workflows/test-and-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
behavioral: ${{ steps.filter.outputs.behavioral }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # chromatic needs access to the history
- name: Check Paths
uses: dorny/paths-filter@v2.9.0
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
Expand All @@ -35,19 +35,19 @@ jobs:
behavioral:
- 'vue-components/**'
- name: Set up node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
id: cache
with:
path: |
node_modules
*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/package.json') }}
- name: Cache artifacts
uses: actions/cache@v2
uses: actions/cache@v3
id: dist
with:
path: |
Expand All @@ -65,15 +65,15 @@ jobs:
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # chromatic needs access to the history
- name: Set up node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Restore dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -88,22 +88,22 @@ jobs:
if: ${{ needs.setup.outputs.visual == 'true' || github.ref == 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # chromatic needs access to the history
- name: Set up node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Restore dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
node_modules
*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/package.json') }}
- name: Restore artifacts
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
*/dist
Expand All @@ -118,16 +118,16 @@ jobs:
needs: setup
if: ${{ github.repository_owner == 'wmde' }}
outputs:
deploy_url: ${{ steps.netlify_deploy.outputs.url }}
deploy_url: ${{ env.NETLIFY_DEPLOY_URL }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Restore dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -136,30 +136,29 @@ jobs:
- name: Build Project
run: npm run build:storybook
- name: Deploy to netlify
id: netlify_deploy
run: echo "::set-output name=url::$(npx -p netlify-cli
run: echo "NETLIFY_DEPLOY_URL=$(npx -p netlify-cli
netlify deploy --dir=docs/dist --json
--alias $(echo '${{ github.ref }}' | shasum | awk '{print $1}')
| jq '.deploy_url' --raw-output)"
| jq '.deploy_url' --raw-output)" >> $GITHUB_ENV
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Print deploy URL
run: echo ${{ steps.netlify_deploy.outputs.url }}
run: echo ${{ env.NETLIFY_DEPLOY_URL }}

browser-tests:
runs-on: ubuntu-latest
needs: [setup, deploy]
if: ${{ needs.setup.outputs.behavioral == 'true' || github.ref == 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Restore dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
node_modules
Expand Down

0 comments on commit 0748a0b

Please sign in to comment.