Skip to content

Commit

Permalink
Added issues workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
larsore committed Oct 14, 2024
1 parent c163c0e commit 5c88256
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SOPS_AGE_KEY=AGE-SECRET-KEY-1X5DH3RVJ83CK3TJNGGC5QA277NRC9JDK2W5DUG8DY5P05CVL88WS8FT049
SOPS_AGE_KEY=${SOPS_AGE_KEY}
14 changes: 14 additions & 0 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Add all issues to Sikkerhetsmetrikker project

on:
issues:

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/kartverket/projects/20
github-token: ${{ secrets.ISSUES_PAT }}
33 changes: 33 additions & 0 deletions .github/workflows/move-linked-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Move linked issue to specific project column based on PR status

on:
pull_request:
types: [converted_to_draft, opened, ready_for_review]

jobs:
manage-project:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Move PR to In Progress
uses: leonsteinhaeuser/[email protected]
if: ${{ (github.event.action == 'opened' && github.event.pull_request.draft) || github.event.action == 'converted_to_draft' }}
with:
gh_token: ${{ secrets.ISSUES_PAT }}
organization: kartverket
project_id: 20
resource_node_id: ${{ github.event.pull_request.node_id }}
move_related_issues: true
status_value: 'In Progress' # Target status

- name: Move PR to Ready for review
uses: leonsteinhaeuser/[email protected]
if: ${{ (github.event.action == 'opened' && !github.event.pull_request.draft) || github.event.action == 'ready_for_review' }}
with:
gh_token: ${{ secrets.ISSUES_PAT }}
organization: kartverket
project_id: 20
resource_node_id: ${{ github.event.pull_request.node_id }}
move_related_issues: true
status_value: 'Ready for review' # Target status
5 changes: 3 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ services:
crypto-service:
build: .
ports:
- "8080:8081"

- "8083:8084"
env_file:
- .env

0 comments on commit 5c88256

Please sign in to comment.