diff --git a/.github/workflows/comment-and-close-reusable.yml b/.github/workflows/comment-and-close-reusable.yml deleted file mode 100644 index 1235d459..00000000 --- a/.github/workflows/comment-and-close-reusable.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: - workflow_call: - -jobs: - comment-and-close: - runs-on: ubuntu-latest - steps: - - run: "gh issue close --comment 'If you would like to file a bug report or feature request, please refer to our issue tracker: https://dhis2.atlassian.net'" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/comment-and-close.yml b/.github/workflows/comment-and-close.yml index 393ff7c1..410c3390 100644 --- a/.github/workflows/comment-and-close.yml +++ b/.github/workflows/comment-and-close.yml @@ -4,5 +4,5 @@ on: jobs: comment-and-close: - uses: ./.github/workflows/comment-and-close-reusable.yml + uses: dhis2/workflows-test/.github/workflows/comment-and-close.yml if: !contains(github.event.issues.sender.login , fromJson('["dhis2-bot", "kodiakhq", "dependabot"]')) diff --git a/.github/workflows/deploy-pr-reusable.yml b/.github/workflows/deploy-pr-reusable.yml deleted file mode 100644 index 06c7f4ad..00000000 --- a/.github/workflows/deploy-pr-reusable.yml +++ /dev/null @@ -1,37 +0,0 @@ -on: - workflow_call: - secrets: - DHIS2_BOT_GITHUB_TOKEN: - required: true - DHIS2_BOT_NETLIFY_TOKEN: - required: true - NETLIFY_SITE_ID: - required: true - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - run: yarn install --frozen-lockfile - - run: yarn d2-app-scripts build --standalone - - id: netlify-deploy - uses: nwtgck/actions-netlify@v3 - timeout-minutes: 1 - with: - github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} - github-deployment-environment: 'netlify' - github-deployment-description: 'PR Preview on Netlify' - deploy-message: ${{ github.event.pull_request.title }} - enable-pull-request-comment: true - enable-commit-comment: true - enable-commit-status: true - alias: pr-${{ github.event.number }} - publish-dir: 'build/app' - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.DHIS2_BOT_NETLIFY_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml index 1ecf48cc..da7c5733 100644 --- a/.github/workflows/deploy-pr.yml +++ b/.github/workflows/deploy-pr.yml @@ -9,6 +9,6 @@ concurrency: jobs: deploy: - uses: ./.github/workflows/deploy-pr-reusable.yml + uses: dhis2/workflows-test/.github/workflows/deploy-pr.yml if: '!github.event.pull_request.repository.fork' secrets: inherit diff --git a/.github/workflows/deploy-production-reusable.yml b/.github/workflows/deploy-production-reusable.yml deleted file mode 100644 index 886d72b3..00000000 --- a/.github/workflows/deploy-production-reusable.yml +++ /dev/null @@ -1,38 +0,0 @@ -on: - workflow_call: - secrets: - DHIS2_BOT_GITHUB_TOKEN: - required: true - DHIS2_BOT_NETLIFY_TOKEN: - required: true - NETLIFY_SITE_ID: - required: true - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - run: yarn install --frozen-lockfile - - run: yarn d2-app-scripts build --standalone - - id: netlify-deploy - uses: nwtgck/actions-netlify@v3 - timeout-minutes: 1 - with: - github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} - github-deployment-environment: 'netlify' - github-deployment-description: 'Production Deploy on Netlify' - deploy-message: Github actions production deploy - enable-pull-request-comment: false - enable-commit-comment: true - enable-commit-status: true - production-branch: master - production-deploy: true - publish-dir: 'build/app' - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.DHIS2_BOT_NETLIFY_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 6ccea54d..ce93d954 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -11,5 +11,5 @@ concurrency: jobs: deploy: - uses: ./.github/workflows/deploy-production-reusable.yml + uses: dhis2/workflows-test/.github/workflows/deploy-production.yml secrets: inherit diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 891f5776..00000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,28 +0,0 @@ -on: - workflow_call: - secrets: - CYPRESS_LOGIN_NAME: - required: true - CYPRESS_LOGIN_PASSWORD: - required: true - -jobs: - e2e: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - uses: cypress-io/github-action@v6 - with: - start: npx --yes @dhis2/cli-cluster up 2.41 --channel dev --db-version 2.41 --seed, yarn start:nobrowser - wait-on: 'http://localhost:8080/dhis-web-commons/security/login.action, http://localhost:3000' - wait-on-timeout: 600 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CYPRESS_LOGIN_NAME: ${{ secrets.CYPRESS_LOGIN_NAME }} - CYPRESS_LOGIN_PASSWORD: ${{ secrets.CYPRESS_LOGIN_PASSWORD }} - CYPRESS_LOGIN_SERVER: http://localhost:8080 - - run: npx --yes @dhis2/cli-cluster down 2.41 diff --git a/.github/workflows/lint-commits.yml b/.github/workflows/lint-commits.yml deleted file mode 100644 index 43bfc63e..00000000 --- a/.github/workflows/lint-commits.yml +++ /dev/null @@ -1,20 +0,0 @@ -on: - workflow_call: - -jobs: - lint-commits: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - run: yarn install --frozen-lockfile - - id: commitlint - run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") - - uses: wagoid/commitlint-github-action@v5 - with: - configFile: ${{ steps.commitlint.outputs.config_path }} diff --git a/.github/workflows/lint-pr-title-reusable.yml b/.github/workflows/lint-pr-title-reusable.yml deleted file mode 100644 index 1fc29af8..00000000 --- a/.github/workflows/lint-pr-title-reusable.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: - workflow_call: - -jobs: - lint-pr-title: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - run: yarn install --frozen-lockfile - - id: commitlint - run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") - - uses: JulienKode/pull-request-name-linter-action@v0.5.0 - with: - configuration-path: ${{ steps.commitlint.outputs.config_path }} diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml index 5b5900eb..acb26749 100644 --- a/.github/workflows/lint-pr-title.yml +++ b/.github/workflows/lint-pr-title.yml @@ -10,4 +10,4 @@ concurrency: jobs: lint-pr-title: - uses: ./.github/workflows/lint-pr-title-reusable.yml + uses: dhis2/workflows-test/.github/workflows/lint-pr-title.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 954e8052..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,15 +0,0 @@ -on: - workflow_call: - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - run: yarn install --frozen-lockfile - - run: yarn d2-app-scripts i18n generate - - run: yarn d2-style check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 0a3b0f9b..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,33 +0,0 @@ -on: - workflow_call: - secrets: - DHIS2_BOT_GITHUB_TOKEN: - required: true - DHIS2_BOT_APPHUB_TOKEN: - required: true - -env: - GIT_COMMITTER_NAME: '@dhis2-bot' - GIT_COMMITTER_EMAIL: 'apps@dhis2.org' - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - run: yarn install --frozen-lockfile - - run: yarn d2-app-scripts build - - uses: dhis2/action-semantic-release@master - with: - publish-apphub: true - publish-github: true - github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} - apphub-token: ${{ secrets.DHIS2_BOT_APPHUB_TOKEN }} - - uses: dhis2/deploy-build@master - with: - build-dir: build/app - github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index a4e579aa..652de645 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -9,19 +9,19 @@ concurrency: jobs: lint-commits: - uses: ./.github/workflows/lint-commits.yml + uses: dhis2/workflows-test/.github/workflows/lint-commits.yml lint: - uses: ./.github/workflows/lint.yml + uses: dhis2/workflows-test/.github/workflows/lint.yml test: - uses: ./.github/workflows/test.yml + uses: dhis2/workflows-test/.github/workflows/test.yml e2e: - uses: ./.github/workflows/e2e.yml + uses: dhis2/workflows-test/.github/workflows/e2e.yml # Skips forks and dependabot PRs if: '!github.event.push.repository.fork' secrets: inherit release: needs: [lint, test, e2e] - uses: ./.github/workflows/release.yml + uses: dhis2/workflows-test/.github/workflows/release.yml # Skips forks and dependabot PRs if: '!github.event.push.repository.fork' secrets: inherit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 90158e17..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,15 +0,0 @@ -on: - workflow_call: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'yarn' - - run: yarn install --frozen-lockfile - - run: yarn d2-app-scripts i18n generate - - run: yarn d2-app-scripts test