17 Commits

Author SHA1 Message Date
12770e487b Update .gitea/workflows/release-with-tag.yaml 2025-05-10 21:27:09 +02:00
6b484d88f3 Update .gitea/workflows/create-release-preexisting-tag.yaml 2025-05-07 00:39:41 +02:00
ae7a0e9477 Update .gitea/workflows/create-release-preexisting-tag.yaml 2025-05-07 00:32:51 +02:00
eea7088054 Add .gitea/workflows/create-release-preexisting-tag.yaml 2025-05-07 00:27:32 +02:00
0bbbfe3ff1 Update .gitea/workflows/release-with-tag.yaml 2025-05-07 00:10:59 +02:00
b51168ccfd Add .gitea/workflows/release-with-tag.yaml 2025-05-07 00:05:58 +02:00
c925d6228b Add .gitea/workflows/changelog.yaml 2025-05-06 23:29:26 +02:00
dc651631dd chore(deps): update sonarsource/sonarqube-scan-action action to v5.2.0 (#26)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [SonarSource/sonarqube-scan-action](https://github.com/SonarSource/sonarqube-scan-action) | action | minor | `v5.1.0` -> `v5.2.0` |

---

### Release Notes

<details>
<summary>SonarSource/sonarqube-scan-action (SonarSource/sonarqube-scan-action)</summary>

### [`v5.2.0`](https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v5.2.0)

[Compare Source](https://github.com/SonarSource/sonarqube-scan-action/compare/v5.1.0...v5.2.0)

#### What's Changed

-   SQSCANGHA-90 remove mend dead conf by [@&#8203;pierre-guillot-gh](https://github.com/pierre-guillot-gh) in https://github.com/SonarSource/sonarqube-scan-action/pull/184
-   SQSCANGHA-89 Attempt to fix command injection by [@&#8203;henryju](https://github.com/henryju) in https://github.com/SonarSource/sonarqube-scan-action/pull/186
-   SQSCANGHA-93 Fix madhead/semver-utils' version by [@&#8203;csaba-feher-sonarsource](https://github.com/csaba-feher-sonarsource) in https://github.com/SonarSource/sonarqube-scan-action/pull/187
-   SQSCANGHA-94 Update version update logic by [@&#8203;csaba-feher-sonarsource](https://github.com/csaba-feher-sonarsource) in https://github.com/SonarSource/sonarqube-scan-action/pull/188
-   SQSCANGHA-92 Validate scanner version by [@&#8203;csaba-feher-sonarsource](https://github.com/csaba-feher-sonarsource) in https://github.com/SonarSource/sonarqube-scan-action/pull/189

**Full Changelog**: https://github.com/SonarSource/sonarqube-scan-action/compare/v5...v5.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4wLjkiLCJ1cGRhdGVkSW5WZXIiOiI0MC4wLjkiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbInR5cGUvZGVwZW5kZW5jaWVzIl19-->

Reviewed-on: #26
Reviewed-by: Luke Tainton <luke@tainton.uk>
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-05-06 21:17:59 +02:00
852a512919 chore(deps): update appleboy/scp-action action to v1 (#25)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [appleboy/scp-action](https://github.com/appleboy/scp-action) | action | major | `v0.1.7` -> `v1.0.0` |

---

### Release Notes

<details>
<summary>appleboy/scp-action (appleboy/scp-action)</summary>

### [`v1.0.0`](https://github.com/appleboy/scp-action/releases/tag/v1.0.0)

[Compare Source](https://github.com/appleboy/scp-action/compare/v0.1.7...v1.0.0)

#### Changelog

##### Features

-   [`172d463`](172d4632fe): feat(actions): improve API robustness and testing coverage ([@&#8203;appleboy](https://github.com/appleboy))
-   [`98b7132`](98b7132065): feat: migrate to composite action with dynamic drone-scp support ([#&#8203;197](https://github.com/appleboy/scp-action/issues/197)) ([@&#8203;appleboy](https://github.com/appleboy))

##### Others

-   [`b03d725`](b03d7257ae): style: improve readability and functionality across multiple components ([@&#8203;appleboy](https://github.com/appleboy))

##### Enhancements

-   [`699fa11`](699fa1181c): chore(deps): bump tj-actions/changed-files from 41 to 42 ([#&#8203;165](https://github.com/appleboy/scp-action/issues/165)) ([@&#8203;dependabot](https://github.com/dependabot)\[bot])
-   [`f314a53`](f314a5399e): chore(deps): bump tj-actions/changed-files from 42 to 43 ([#&#8203;170](https://github.com/appleboy/scp-action/issues/170)) ([@&#8203;dependabot](https://github.com/dependabot)\[bot])
-   [`9ba6206`](9ba62064d2): chore(deps): bump tj-actions/changed-files from 43 to 44 ([#&#8203;171](https://github.com/appleboy/scp-action/issues/171)) ([@&#8203;dependabot](https://github.com/dependabot)\[bot])
-   [`7622c01`](7622c01418): chore: update tj-actions/changed-files action version ([@&#8203;appleboy](https://github.com/appleboy))
-   [`6aff649`](6aff6492ae): chore: bump default DRONE_SCP_VERSION to 1.8.0 ([@&#8203;appleboy](https://github.com/appleboy))

##### Refactor

-   [`93e17a4`](93e17a47f9): refactor(actions): standardize configuration file formatting and defaults ([@&#8203;appleboy](https://github.com/appleboy))

##### Build process updates

-   [`c6ff96b`](c6ff96b7f6): ci: implement automated release workflow with GoReleaser ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f042d74`](f042d742db): ci(github): improve system performance and stability ([@&#8203;appleboy](https://github.com/appleboy))
-   [`f5c6c23`](f5c6c234bd): ci: align workflow naming with updated testing conventions ([@&#8203;appleboy](https://github.com/appleboy))

##### Documentation updates

-   [`9f34cc3`](9f34cc3e55): docs(readme): update dependency in example ([#&#8203;159](https://github.com/appleboy/scp-action/issues/159)) ([@&#8203;ilyabrin](https://github.com/ilyabrin))
-   [`ad9a378`](ad9a378b7f): docs(readme): enhance IP protocol configuration options ([@&#8203;appleboy](https://github.com/appleboy))
-   [`4f2c27b`](4f2c27bbc2): docs: improve documentation and testing configurations ([#&#8203;193](https://github.com/appleboy/scp-action/issues/193)) ([@&#8203;appleboy](https://github.com/appleboy))
-   [`2a829c0`](2a829c0ed2): docs: improve API performance and update documentation ([@&#8203;appleboy](https://github.com/appleboy))
-   [`3d59448`](3d59448764): docs: enhance SSH configuration documentation and testing ([@&#8203;appleboy](https://github.com/appleboy))
-   [`bc835cb`](bc835cba55): docs: refine input descriptions for clarity and user guidance ([@&#8203;appleboy](https://github.com/appleboy))
-   [`e55e4ea`](e55e4eabdc): docs: refine and expand documentation for variable configuration ([@&#8203;appleboy](https://github.com/appleboy))
-   [`bf323b8`](bf323b8729): docs: overhaul and enrich documentation for clarity and onboarding ([@&#8203;appleboy](https://github.com/appleboy))
-   [`17026f9`](17026f90b8): docs: add comprehensive Chinese documentation and localization support ([@&#8203;appleboy](https://github.com/appleboy))
-   [`6b2d309`](6b2d3092e3): docs: update README badges to reference lint and test workflow ([@&#8203;appleboy](https://github.com/appleboy))
-   [`ff85246`](ff85246aca): docs: update documentation to use latest scp-action version ([@&#8203;appleboy](https://github.com/appleboy))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTkuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1OS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: #25
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-04-27 16:15:44 +02:00
172aa32d4b chore(deps): update sonarsource/sonarqube-scan-action action to v5.1.0 (#24)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [SonarSource/sonarqube-scan-action](https://github.com/SonarSource/sonarqube-scan-action) | action | minor | `v5.0.0` -> `v5.1.0` |

---

### Release Notes

<details>
<summary>SonarSource/sonarqube-scan-action (SonarSource/sonarqube-scan-action)</summary>

### [`v5.1.0`](https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v5.1.0)

[Compare Source](https://github.com/SonarSource/sonarqube-scan-action/compare/v5.0.0...v5.1.0)

#### What's Changed

-   Update SonarScanner CLI to 7.1.0.4889 to support sonar.region=us by [@&#8203;github-actions](https://github.com/github-actions) in https://github.com/SonarSource/sonarqube-scan-action/pull/183

**Full Changelog**: https://github.com/SonarSource/sonarqube-scan-action/compare/v5.0.0...v5.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjIxMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: #24
Reviewed-by: Luke Tainton <luke@tainton.uk>
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-03-24 19:15:14 +01:00
691d3c563f chore(deps): update https://git.tainton.uk/actions/pushover-action action to v1.1.3 (#23)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://git.tainton.uk/actions/pushover-action](https://git.tainton.uk/actions/pushover-action) | action | patch | `v1.1.0` -> `v1.1.3` |

---

### Release Notes

<details>
<summary>actions/pushover-action (https://git.tainton.uk/actions/pushover-action)</summary>

### [`v1.1.3`](https://git.tainton.uk/actions/pushover-action/compare/v1.1.2...v1.1.3)

[Compare Source](https://git.tainton.uk/actions/pushover-action/compare/v1.1.2...v1.1.3)

### [`v1.1.2`](https://git.tainton.uk/actions/pushover-action/compare/v1.1.1...v1.1.2)

[Compare Source](https://git.tainton.uk/actions/pushover-action/compare/v1.1.1...v1.1.2)

### [`v1.1.1`](https://git.tainton.uk/actions/pushover-action/compare/v1.1.0...v1.1.1)

[Compare Source](https://git.tainton.uk/actions/pushover-action/compare/v1.1.0...v1.1.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjIxMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: #23
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-03-23 22:15:41 +01:00
391f3d91d5 Switch to custom PO action 2025-03-23 20:52:33 +00:00
760677ad0b add msg to pushover 2025-03-23 20:19:21 +00:00
eb015fdf76 Update .gitea/workflows/docker-compose-deploy.yml 2025-03-23 21:07:59 +01:00
a8cb18773b Update .gitea/workflows/docker-compose-remove.yml 2025-03-23 21:07:41 +01:00
50aad049e7 add docker compose flows 2025-03-23 20:03:07 +00:00
5d57ab1717 chore(deps): update sonarsource/sonarqube-scan-action action to v5 (#22)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [SonarSource/sonarqube-scan-action](https://github.com/SonarSource/sonarqube-scan-action) | action | major | `v4.2.1` -> `v5.0.0` |

---

### Release Notes

<details>
<summary>SonarSource/sonarqube-scan-action (SonarSource/sonarqube-scan-action)</summary>

### [`v5.0.0`](https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v5.0.0)

[Compare Source](https://github.com/SonarSource/sonarqube-scan-action/compare/v4.2.1...v5.0.0)

#### What's Changed

-   SQSCANGHA-81 Update SonarScanner CLI to 7.0.2.4839 by [@&#8203;github-actions](https://github.com/github-actions) in https://github.com/SonarSource/sonarqube-scan-action/pull/175

**Full Changelog**: https://github.com/SonarSource/sonarqube-scan-action/compare/v4...v5.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzEuMyIsInVwZGF0ZWRJblZlciI6IjM5LjE3MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: #22
Co-authored-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
Co-committed-by: Renovate [BOT] <renovate-bot@git.tainton.uk>
2025-02-17 11:58:20 +01:00
16 changed files with 334 additions and 11 deletions

View File

@ -0,0 +1,67 @@
name: Get Changelog
on:
workflow_call:
outputs:
release_name:
description: "Name of the created release"
value: ${{ jobs.get_next_release.outputs.release_name }}
changelog:
description: "Release changelog"
value: ${{ jobs.get_next_release.outputs.clean_changelog }}
jobs:
get_next_release:
name: Get Next Release
runs-on: ubuntu-latest
outputs:
release_name: ${{ steps.get_next_version.outputs.tag }}
# changelog: ${{ steps.get_next_version.outputs.changelog }}
clean_changelog: ${{ steps.get_next_version.outputs.clean_changelog }}
steps:
- name: Check out repository
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Changes since last tag
id: changes
run: |
rm -f .changes
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline >> .changes
cat .changes
- name: Check for changes
run: |
if [[ -z $(grep '[^[:space:]]' .changes) ]] ; then
echo "changes=false"
echo "changes=false" >> "$GITEA_OUTPUT"
else
echo "changes=true"
echo "changes=true" >> "$GITEA_OUTPUT"
fi
- name: Cancel if no changes
if: steps.changes.outputs.changes == 'false'
run: exit 1
- name: Set server URL
id: set_srvurl
run: |
SRVURL=$(echo "${{ gitea.server_url }}" | sed 's/https:\/\/\(.*\)/\1/')
echo "srvurl=$SRVURL" >> "$GITEA_OUTPUT"
- name: Get next version
uses: TriPSs/conventional-changelog-action@v6
id: get_next_version
with:
git-url: ${{ steps.set_srvurl.outputs.srvurl }}
github-token: ${{ gitea.token }}
preset: "conventionalcommits"
# preset: "angular" # This is the default
skip-commit: true
release-count: 1
output-file: false
create-summary: true
skip-on-empty: true
skip-version-file: true
skip-tag: true

View File

@ -24,7 +24,7 @@ jobs:
no-fail: true
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -66,7 +66,7 @@ jobs:
sed -i 's@${{ gitea.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -57,7 +57,7 @@ jobs:
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -63,7 +63,7 @@ jobs:
run: uv cache prune --ci
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -58,7 +58,7 @@ jobs:
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -51,7 +51,7 @@ jobs:
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -0,0 +1,24 @@
name: Create Gitea Release Pre-Existing Tag
on:
workflow_call:
inputs:
tag:
required: true
body:
required: false
secrets:
ACTIONS_TOKEN:
required: true
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create release
uses: https://git.tainton.uk/actions/create-release-action@v1.1.0
with:
release_name: ${{ inputs.tag }}
tag: ${{ inputs.tag }}
body: ${{ inputs.body }}
token: ${{ secrets.ACTIONS_TOKEN }}

View File

@ -0,0 +1,96 @@
name: Docker Compose Deploy Stack
on:
workflow_call:
secrets:
DEPLOY_HOST:
required: true
type: string
DEPLOY_USERNAME:
required: true
type: string
DEPLOY_SSHKEY:
required: true
type: string
DEPLOY_PORT:
required: true
type: string
PUSHOVER_USER_TOKEN:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: "[ON RUNNER] Notify Build Start"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.3
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
message: "Deploying stack ${{ gitea.repository }}"
title: 'Stack Deployment Started'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Logs'
- name: "[ON RUNNER] Checkout the repo"
uses: actions/checkout@v4
- name: "[ON RUNNER] Set project variables"
run: |
projectname="${{ gitea.event.repository.name }}"
echo "project_name=$projectname" >> $GITEA_ENV
echo "project_folder=/home/${{ secrets.DEPLOY_USERNAME }}/$projectname" >> $GITEA_ENV
- name: "[ON RUNNER] Create env file"
run: |
rm -f ".env"
touch ".env"
echo "$ALLVARS" | jq -r '. | to_entries[] | select(.key | startswith("DC_")) | .key + "=" + .value' >> ".env"
echo "$ALLSECRETS" | jq -r '. | to_entries[] | select(.key | startswith("DC_")) | .key + "=" + .value' >> ".env"
env:
ALLVARS: ${{ toJSON(vars) }}
ALLSECRETS: ${{ toJSON(secrets) }}
- name: "[ON HOST] Make directory if not exists"
uses: appleboy/ssh-action@v1.2.2
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSHKEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: |
mkdir -p ${{ env.project_folder }}
- name: "[ON HOST] SCP files to host"
uses: appleboy/scp-action@v1.0.0
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
port: ${{ secrets.DEPLOY_PORT }}
key: ${{ secrets.DEPLOY_SSHKEY }}
source: "./compose.yaml,./.env"
target: "${{ env.project_folder }}/"
- name: "[ON HOST] Deploy Stack"
uses: appleboy/ssh-action@v1.2.2
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSHKEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: |
cd ${{ env.project_folder }}
docker compose --env-file .env up --detach
- name: "[ON RUNNER] Notify Build End"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.3
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
message: "Deployed stack ${{ gitea.repository }}"
title: 'Stack Deployment ${{ job.status }}'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Logs'

View File

@ -0,0 +1,65 @@
name: Docker Compose Remove Stack
on:
workflow_call:
secrets:
DEPLOY_HOST:
required: true
type: string
DEPLOY_USERNAME:
required: true
type: string
DEPLOY_SSHKEY:
required: true
type: string
DEPLOY_PORT:
required: true
type: string
PUSHOVER_USER_TOKEN:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: "[ON RUNNER] Notify Build Start"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.3
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
message: "Removing stack ${{ gitea.repository }}"
title: 'Stack Removal Started'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Logs'
- name: "[ON RUNNER] Set project variables"
run: |
projectname="${{ gitea.event.repository.name }}"
echo "project_name=$projectname" >> $GITEA_ENV
echo "project_folder=/home/${{ secrets.DEPLOY_USERNAME }}/$projectname" >> $GITEA_ENV
- name: "[ON HOST] Remove Stack"
uses: appleboy/ssh-action@v1.2.2
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSHKEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: |
cd ${{ env.project_folder }}
docker compose --env-file .env down
cd ..
rm -rf ${{ env.project_folder }}
- name: "[ON RUNNER] Notify Build End"
uses: https://git.tainton.uk/actions/pushover-action@v1.1.3
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
message: "Removed stack ${{ gitea.repository }}"
title: 'Stack Removal ${{ job.status }}'
url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}"
url_title: 'View Logs'

View File

@ -0,0 +1,71 @@
name: Release w/ Tag
on:
workflow_call:
outputs:
tag_name:
description: "Tag name"
value: ${{ jobs.get_next_release.outputs.release_name }}
changelog:
description: "Changelog"
value: ${{ jobs.get_next_release.outputs.clean_changelog }}
jobs:
get_next_release:
name: Get Next Release
runs-on: ubuntu-latest
outputs:
release_name: ${{ steps.get_next_version.outputs.tag }}
# changelog: ${{ steps.get_next_version.outputs.changelog }}
clean_changelog: ${{ steps.get_next_version.outputs.clean_changelog }}
steps:
- name: Check out repository
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Changes since last tag
id: changes
run: |
rm -f .changes
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline >> .changes
cat .changes
- name: Check for changes
run: |
if [[ -z $(grep '[^[:space:]]' .changes) ]] ; then
echo "changes=false"
echo "changes=false" >> "$GITEA_OUTPUT"
else
echo "changes=true"
echo "changes=true" >> "$GITEA_OUTPUT"
fi
- name: Cancel if no changes
if: steps.changes.outputs.changes == 'false'
run: exit 1
- name: Set server URL
id: set_srvurl
run: |
SRVURL=$(echo "${{ gitea.server_url }}" | sed 's/https:\/\/\(.*\)/\1/')
echo "srvurl=$SRVURL" >> "$GITEA_OUTPUT"
- name: Get next version
uses: TriPSs/conventional-changelog-action@v6
id: get_next_version
with:
git-url: ${{ steps.set_srvurl.outputs.srvurl }}
github-token: ${{ gitea.token }}
preset: "conventionalcommits"
# preset: "angular" # This is the default
skip-commit: true
release-count: 1
output-file: false
create-summary: true
skip-on-empty: true
skip-version-file: true
skip-tag: false
- name: Cancel if no changelog
if: steps.get_next_version.outputs.skipped == 'true'
run: exit 1

View File

@ -22,7 +22,7 @@ jobs:
format: sonarqube
no-fail: true
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -49,7 +49,7 @@ jobs:
poetry run coverage xml
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -41,7 +41,7 @@ jobs:
poetry run coverage xml
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -50,7 +50,7 @@ jobs:
coverage xml
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -44,7 +44,7 @@ jobs:
coverage xml
sed -i 's@${{ github.workspace }}@/github/workspace@g' coverage.xml
- name: SonarQube Cloud Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}