From 8e6cc2a1021131732bad4136f30e0cfad3754d8d Mon Sep 17 00:00:00 2001 From: Kyle Laker Date: Mon, 12 Jun 2023 10:49:30 -0400 Subject: [PATCH] chore(ci): update workflows to use new branch names (#895) `main` will be the current version of the editor/viewer applications and `next` will contain the upcoming refactorings for the next version of the application. --- .github/dependabot.yml | 11 +++++++ .github/workflows/codeql-analysis.yml | 5 +-- .github/workflows/deploy-dev-viewer.yml | 2 +- .github/workflows/deploy-prod-viewer.yml | 2 +- .github/workflows/gh-pages.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/publish-package.yml | 39 ----------------------- .github/workflows/update-dependencies.yml | 4 ++- .github/workflows/update-types.yml | 3 +- 9 files changed, 23 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/publish-package.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9da4121ec..6033af5c7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,5 +8,16 @@ updates: commit-message: include: scope prefix: "chore" + target-branch: main + reviewers: + - "EasyDynamics/oscal-editor-reviewers" + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + commit-message: + include: scope + prefix: "chore" + target-branch: next reviewers: - "EasyDynamics/oscal-editor-reviewers" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a0cf37af0..e11b5b3b8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,11 +4,12 @@ name: "CodeQL" on: push: branches: - - develop - main + - next pull_request: branches: - - develop + - main + - next schedule: - cron: '19 6 * * 4' diff --git a/.github/workflows/deploy-dev-viewer.yml b/.github/workflows/deploy-dev-viewer.yml index 37f35a67e..cff0415a2 100644 --- a/.github/workflows/deploy-dev-viewer.yml +++ b/.github/workflows/deploy-dev-viewer.yml @@ -3,7 +3,7 @@ name: Deploy viewer to Dev environment on: push: - branches: ["develop"] + branches: ["main"] workflow_dispatch: schedule: # Run daily at 03:15 UTC (10:15/11:15 ET) diff --git a/.github/workflows/deploy-prod-viewer.yml b/.github/workflows/deploy-prod-viewer.yml index 349c7bb11..0825cc4cb 100644 --- a/.github/workflows/deploy-prod-viewer.yml +++ b/.github/workflows/deploy-prod-viewer.yml @@ -3,7 +3,7 @@ name: Deploy viewer to Production environment on: push: - branches: ["develop"] + tags: ["v*"] workflow_dispatch: schedule: # Run daily at 03:15 UTC (10:15/11:15 ET) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 8b18bd6c4..c0bd6bfb0 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,7 +3,7 @@ name: Publish Storybook on: push: branches: - - develop + - main workflow_dispatch: permissions: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f8480e522..091386f64 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -5,7 +5,7 @@ on: push: branches: - main - - develop + - next permissions: contents: read diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml deleted file mode 100644 index 4a53405fe..000000000 --- a/.github/workflows/publish-package.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: Publish NPM Packages -on: - push: - tags: - - v** - workflow_dispatch: - -concurrency: package-push - -jobs: - publish: - name: Publish OSCAL Viewer Build to NPM and GitHub Packages - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Setup Node.js for NPM publish - uses: actions/setup-node@v3 - with: - node-version: 'lts/*' - registry-url: 'https://registry.npmjs.org' - - name: Install depdendencies - run: npm ci - - name: Publish to NPM - run: npx lerna publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Reconfigure Node.js for GitHub Packages publish - uses: actions/setup-node@v3 - with: - registry-url: 'https://npm.pkg.github.com' - - name: Publish to GitHub Packages - run: npx lerna publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 0ef9c993e..dd71ddf20 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -24,6 +24,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + ref: main - name: Setup node uses: actions/setup-node@v3 @@ -82,7 +84,7 @@ jobs: by running `npm-check-updates` and `npm install`. branch: automation/update-npm-dependencies delete-branch: true - base: develop + base: main committer: Easy Dynamics Automation author: Easy Dynamics Automation token: "${{ steps.generate-token.outputs.token }}" diff --git a/.github/workflows/update-types.yml b/.github/workflows/update-types.yml index dda594873..0c211a625 100644 --- a/.github/workflows/update-types.yml +++ b/.github/workflows/update-types.yml @@ -67,6 +67,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + ref: main - name: Setup Node.js uses: actions/setup-node@v3 with: @@ -118,7 +119,7 @@ jobs: add-paths: | packages/oscal-types delete-branch: true - base: develop + base: main committer: Easy Dynamics Automation author: Easy Dynamics Automation token: "${{ steps.generate-token.outputs.token }}"