Skip to content

Commit

Permalink
chore: update GitHub Actions versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kyubisation committed Jan 23, 2024
1 parent ca278d5 commit 22524fe
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 93 deletions.
42 changes: 0 additions & 42 deletions .github/actions/download-artifacts-from-workflow/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
35 changes: 16 additions & 19 deletions .github/workflows/continuous-integration-secure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0] != null && github.event.workflow_run.pull_requests[0].number || '' }}
IMAGE_REPO: ghcr.io/${{ github.repository }}/storybook-preview
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: ./.github/actions/download-artifacts-from-workflow
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
artifacts: 'storybook'
- run: mkdir -p dist/storybook
- run: unzip storybook.zip -d dist/storybook
name: storybook
path: dist/storybook/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GH_ACTIONS_ARTIFACT_DOWNLOAD }}
- name: Remove files with forbidden extensions
run: node ./scripts/clean-storybook-files.cjs

- name: Create GitHub Deployment
id: tag-name
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const environment = process.env.PR_NUMBER ? `preview-pr${process.env.PR_NUMBER}` : 'preview-main';
Expand Down Expand Up @@ -81,25 +81,22 @@ jobs:
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
env:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0] != null && github.event.workflow_run.pull_requests[0].number || '' }}
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: ./.github/actions/download-artifacts-from-workflow
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
artifacts: 'pr, coverage'
- run: unzip pr.zip
- run: mkdir coverage
- run: unzip coverage.zip -d coverage
- name: Read PR number
id: pr-number
run: echo "pr=$(<NR)" >> $GITHUB_OUTPUT
shell: bash
name: coverage
path: coverage/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GH_ACTIONS_ARTIFACT_DOWNLOAD }}
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: coverage
override_branch: ${{ github.event.workflow_run.head_branch }}
override_commit: ${{ github.event.workflow_run.head_commit.id }}
override_pr: ${{ steps.pr-number.outputs.pr }}
override_pr: ${{ env.PR_NUMBER }}
fail_ci_if_error: true
verbose: true
37 changes: 13 additions & 24 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand All @@ -24,8 +24,8 @@ jobs:
integrity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand All @@ -39,8 +39,8 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand All @@ -54,27 +54,16 @@ jobs:
NODE_ENV: production
- name: Store coverage
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
- name: Save PR number
if: github.event_name == 'pull_request'
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
- name: Store PR number
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: pr
path: pr/

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand All @@ -85,7 +74,7 @@ jobs:
env:
STORYBOOK_COMPONENTS_VERSION: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Store storybook artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: storybook
path: dist/storybook/
Expand All @@ -95,17 +84,17 @@ jobs:
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
needs: [build, lint, test]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn install --frozen-lockfile --non-interactive
- name: Generate chromatic stories
run: yarn generate:chromatic-stories
- uses: actions/github-script@v6
- uses: actions/github-script@v7
id: version
with:
script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-title-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-image-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
PACKAGE_NAME: storybook-preview
PR_TAG_PREFIX: preview-pr
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const { owner, repo } = context.repo;
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
IMAGE_REPO: ghcr.io/${{ github.repository_owner }}/lyne-components/storybook
VERSION: ${{ needs.release-please.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand Down Expand Up @@ -101,10 +101,10 @@ jobs:
IMAGE_REPO: ghcr.io/${{ github.repository_owner }}/lyne-components/storybook
VERSION: ${{ needs.release-please.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
Expand Down

0 comments on commit 22524fe

Please sign in to comment.