Skip to content

Commit 060859d

Browse files
committed
feat: add actions for deployment
Signed-off-by: Emilien Escalle <[email protected]>
1 parent 927c783 commit 060859d

23 files changed

+1154
-2
lines changed

.ghadocs.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"paths": {
3+
"action": "action.yml",
4+
"readme": "README.md"
5+
},
6+
"show_logo": true,
7+
"versioning": {
8+
"enabled": true,
9+
"override": "",
10+
"prefix": "v",
11+
"branch": "main"
12+
},
13+
"owner": "hoverkraft-tech",
14+
"repo": "ci-github-publish",
15+
"title_prefix": "GitHub Action: ",
16+
"prettier": true
17+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
31+
32+
**Mobile phone (please complete the following information):**
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
38+
39+
**Additional context**
40+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: docker
4+
open-pull-requests-limit: 20
5+
directory: "/"
6+
schedule:
7+
interval: weekly
8+
day: friday
9+
time: "04:00"
10+
groups:
11+
docker-dependencies:
12+
patterns:
13+
- "*"
14+
15+
- package-ecosystem: github-actions
16+
open-pull-requests-limit: 20
17+
directories:
18+
- "/"
19+
- "/actions/**/*"
20+
schedule:
21+
interval: weekly
22+
day: friday
23+
time: "04:00"
24+
groups:
25+
github-actions-dependencies:
26+
patterns:
27+
- "*"

.github/workflows/__main-ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Internal - Main - Continuous Integration
3+
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches: [main]
7+
tags: ["*"]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
statuses: write
13+
deployments: write
14+
# FIXME: This is a workaround for having workflow actions. See https://github.com/orgs/community/discussions/38659
15+
id-token: write
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
ci:
23+
uses: ./.github/workflows/__shared-ci.yml
24+
25+
release:
26+
needs: ci
27+
uses: ./.github/workflows/release-actions.yml
28+
with:
29+
update-all: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' }}
30+
github-app-id: ${{ vars.CI_BOT_APP_ID }}
31+
secrets:
32+
github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Need fix to Issue
3+
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
#checkov:skip=CKV_GHA_7: required
10+
inputs:
11+
manual-commit-ref:
12+
description: "The SHA of the commit to get the diff for"
13+
required: true
14+
manual-base-ref:
15+
description: |
16+
By default, the commit entered above is compared to the one directly before it;
17+
to go back further, enter an earlier SHA here
18+
required: false
19+
20+
permissions:
21+
contents: read
22+
issues: write
23+
24+
jobs:
25+
main:
26+
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected]
27+
with:
28+
manual-commit-ref: ${{ inputs.manual-commit-ref }}
29+
manual-base-ref: ${{ inputs.manual-base-ref }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Internal - Pull request - Continuous Integration
3+
4+
on:
5+
merge_group:
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
issues: read
12+
packages: write
13+
pull-requests: read
14+
statuses: write
15+
# FIXME: This is a workaround for having workflow actions. See https://github.com/orgs/community/discussions/38659
16+
id-token: write
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
ci:
24+
uses: ./.github/workflows/__shared-ci.yml

.github/workflows/__shared-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Internal - Common Continuous Integration tasks
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
statuses: write
10+
deployments: write
11+
12+
jobs:
13+
linter:
14+
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected]
15+
16+
test-action-docker-build-image:
17+
needs: linter
18+
uses: ./.github/workflows/__test-action-deployment.yml

.github/workflows/__stale.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Mark stale issues and pull requests
3+
4+
on: # yamllint disable-line rule:truthy
5+
schedule:
6+
- cron: "30 1 * * *"
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
main:
14+
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Internal - Tests for deployment actions
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
deployments: write
9+
10+
jobs:
11+
tests:
12+
name: Tests for deployment actions
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- id: create-deployment
18+
uses: ./actions/deployment/create
19+
with:
20+
environment: "review-apps"
21+
22+
- name: Check create outputs
23+
run: |
24+
if [ -z "${{ steps.create-deployment.outputs.deployment-id }}" ]; then
25+
echo "Create deployment id output is not set"
26+
exit 1
27+
fi
28+
29+
- id: update-deployment
30+
uses: ./actions/deployment/update
31+
with:
32+
deployment-id: ${{ steps.create-deployment.outputs.deployment-id }}
33+
state: "in_progress"
34+
35+
- id: delete-deployment
36+
uses: ./actions/deployment/delete
37+
38+
- name: Check delete outputs
39+
run: |
40+
if [ -z "${{ steps.delete-deployment.outputs.deployment-ids }}" ]; then
41+
echo "Delete deployment ids output is not set"
42+
exit 1
43+
fi

0 commit comments

Comments
 (0)