Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update to shared workflows #585

Merged
merged 4 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/comment-and-close.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: comment-and-close

on:
issues:
types: [opened]

jobs:
comment-and-close:
runs-on: ubuntu-latest
steps:
- uses: vardevs/candc@v1
with:
close-comment: 'If you would like to file a bug report or feature request, please refer to our issue tracker: https://jira.dhis2.org'
exempt-users: dhis2-bot,dependabot,kodiakhq
github-token: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
uses: dhis2/workflows-platform/.github/workflows/comment-and-close.yml@v1
if: '!contains(github.event.issue.sender.login , fromJson(''["dhis2-bot", "kodiakhq", "dependabot"]''))'
with:
issue_number: ${{ github.event.issue.number }}
14 changes: 14 additions & 0 deletions .github/workflows/deploy-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: deploy-pr

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
deploy:
uses: dhis2/workflows-platform/.github/workflows/deploy-pr.yml@v1
if: '!github.event.pull_request.head.repo.fork'
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: deploy-production

on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
uses: dhis2/workflows-platform/.github/workflows/deploy-production.yml@v1
secrets: inherit
with:
branch: master
51 changes: 0 additions & 51 deletions .github/workflows/dhis2-preview-pr.yml

This file was deleted.

118 changes: 0 additions & 118 deletions .github/workflows/dhis2-verify-app.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/dhis2-verify-commits.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: lint-pr-title

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
lint-pr-title:
uses: dhis2/workflows-platform/.github/workflows/lint-pr-title.yml@v1
20 changes: 20 additions & 0 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: test-and-release

on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel previous runs if not on a release branch
cancel-in-progress: ${{ !contains(fromJSON('["refs/heads/master", "ref/heads/main"]'), github.ref) }}

jobs:
lint-commits:
uses: dhis2/workflows-platform/.github/workflows/lint-commits.yml@v1
lint:
uses: dhis2/workflows-platform/.github/workflows/lint.yml@v1
release:
needs: [lint-commits, lint]
uses: dhis2/workflows-platform/.github/workflows/release.yml@v1
# Skips forks and dependabot PRs
if: '!github.event.push.repository.fork'
secrets: inherit
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"format": "yarn format:js && yarn format:text"
},
"devDependencies": {
"@dhis2/cli-app-scripts": "^8.0.1",
"@dhis2/cli-app-scripts": "^11.7.1",
"@dhis2/cli-style": "^10.4.1"
},
"dependencies": {
"@dhis2/app-runtime": "^3.2.0",
"@dhis2/d2-i18n": "^1.1.0",
"@dhis2/ui": "^7.1.1",
"@dhis2/ui": "^9.11.3",
"react-dnd": "^11.1.3",
"react-dnd-html5-backend": "^11.1.3"
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MenuManagement/DraggableApp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from '@dhis2/prop-types'
import PropTypes from 'prop-types'
import React, { useRef } from 'react'
import { useDrag, useDrop } from 'react-dnd'
import classes from './DraggableApp.module.css'
Expand Down
2 changes: 1 addition & 1 deletion src/components/MenuManagement/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
useConfig,
useAlert,
} from '@dhis2/app-runtime'
import { PropTypes } from '@dhis2/prop-types'
import { NoticeBox, CenteredContent, CircularLoader, Card } from '@dhis2/ui'
import PropTypes from 'prop-types'
import React, { useMemo, useState, useCallback } from 'react'
import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'
Expand Down Expand Up @@ -60,7 +60,7 @@
)
const handleAppDrop = useCallback(() => {
mutate({ items: appsOrder })
}, [appsOrder])

Check warning on line 63 in src/components/MenuManagement/index.js

View workflow job for this annotation

GitHub Actions / lint / lint

React Hook useCallback has a missing dependency: 'mutate'. Either include it or remove the dependency array

return (
<Card>
Expand Down Expand Up @@ -105,7 +105,7 @@
icon: getPath(app.icon),
defaultAction: getPath(app.defaultAction),
}))
}, [data])

Check warning on line 108 in src/components/MenuManagement/index.js

View workflow job for this annotation

GitHub Actions / lint / lint

React Hook useMemo has a missing dependency: 'baseUrl'. Either include it or remove the dependency array

if (loading) {
return (
Expand Down
Loading
Loading