Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f6750482a7 | |||
| 4d667c9fe0 | |||
| d9ffd2726f | |||
| d7dde0e936 | |||
| 173c01c9ca | |||
| 39fd0b7054 | |||
| 9104c113dc | |||
| 2ce0f74e27 | |||
| 728bae9120 | |||
|
2ae472fd70
|
|||
|
bff92f363b
|
|||
|
5eefad3bfc
|
|||
|
fcc9ac5d86
|
|||
|
3512ce520d
|
|||
|
c5017145ca
|
|||
|
6daafc6841
|
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
username: ${{ secrets.registry-user }}
|
||||
password: ${{ secrets.registry-password }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
||||
28
.gitea/workflows/cog-check.yml
Normal file
28
.gitea/workflows/cog-check.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Cog check
|
||||
on:
|
||||
pull_request:
|
||||
workflow_call:
|
||||
# inputs:
|
||||
# check-latest-tag-only:
|
||||
# type: boolean
|
||||
# required: false
|
||||
# default: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Create release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Semver release
|
||||
uses: cocogitto/cocogitto-action@v3
|
||||
with:
|
||||
# check-latest-tag-only: ${{ inputs.check-latest-tag-only }}
|
||||
check-latest-tag-only: true
|
||||
git-user: "gitea-bot"
|
||||
git-user-email: "bot@git.palkoi.net"
|
||||
@@ -1,6 +1,15 @@
|
||||
name: Release
|
||||
---
|
||||
name: Cog release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_call:
|
||||
# inputs:
|
||||
# check-latest-tag-only:
|
||||
# type: boolean
|
||||
# required: false
|
||||
# default: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -8,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -26,6 +35,7 @@ jobs:
|
||||
git-user: "gitea-bot"
|
||||
git-user-email: "bot@git.palkoi.net"
|
||||
check-latest-tag-only: true
|
||||
# check-latest-tag-only: ${{ inputs.check-latest-tag-only }}
|
||||
|
||||
- name: Generate Changelog
|
||||
run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md
|
||||
@@ -27,10 +27,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Retrieve artifacts
|
||||
id: download
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: artifacts
|
||||
- name: Check if job errored
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
exit "$(cat exitcode)";
|
||||
fi
|
||||
- name: Clone blackbox repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
if: ${{ steps.check.outputs.code == 2 }}
|
||||
with:
|
||||
repository: xaked/blackbox
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
known-hosts: ${{ secrets.ssh-known-hosts }}
|
||||
- name: Restore tofu cache
|
||||
if: ${{ steps.check.outputs.code == 2 }}
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
id: cache-tofu-restore
|
||||
with:
|
||||
path: .terraform
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
run: tofu apply -input=false -auto-approve tfplan.binary;
|
||||
- name: Save tofu cache
|
||||
if: ${{ steps.check.outputs.code == 2 }}
|
||||
uses: actions/cache/save@v4
|
||||
uses: actions/cache/save@v5
|
||||
id: cache-tofu-save
|
||||
with:
|
||||
path: .terraform
|
||||
|
||||
@@ -31,9 +31,9 @@ jobs:
|
||||
tofu_version: ${{ inputs.tofu-version }}
|
||||
cli_config_credentials_token: ${{ secrets.tf-api-token }}
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Clone blackbox repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: xaked/blackbox
|
||||
path: blackbox
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
private-key-name: id_ed25519
|
||||
known-hosts: ${{ secrets.ssh-known-hosts }}
|
||||
- name: Restore tofu cache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
id: cache-tofu-restore
|
||||
with:
|
||||
path: .terraform
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
shell: bash
|
||||
run: printf "${{ steps.tfplan.outputs.exitcode }}" > exitcode;
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: artifacts
|
||||
path: |
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
exit 1;
|
||||
fi
|
||||
- name: Save tofu cache
|
||||
uses: actions/cache/save@v4
|
||||
uses: actions/cache/save@v5
|
||||
id: cache-tofu-save
|
||||
with:
|
||||
path: .terraform
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone blackbox repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: xaked/blackbox
|
||||
path: blackbox
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Run Trivy vulnerability scanner in IaC mode (LOW/MED)
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
steps:
|
||||
# Git Checkout
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
token: ${{ secrets.gitea-token }}
|
||||
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
id: ml
|
||||
# You can override MegaLinter flavor used to have faster performances
|
||||
# More info at https://megalinter.io/flavors/
|
||||
uses: oxsecurity/megalinter@v7
|
||||
uses: oxsecurity/megalinter@v9
|
||||
env:
|
||||
# All available variables are described in documentation
|
||||
# https://megalinter.io/configuration/
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
# Upload MegaLinter artifacts
|
||||
- name: Archive production artifacts
|
||||
if: success() || failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: MegaLinter reports
|
||||
path: |
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
- name: Create Pull Request with applied fixes
|
||||
id: cpr
|
||||
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
with:
|
||||
token: ${{ secrets.gitea-token }}
|
||||
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
||||
@@ -99,7 +99,7 @@ jobs:
|
||||
run: sudo chown -Rc $UID .git/
|
||||
- name: Commit and push applied linter fixes
|
||||
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v7
|
||||
with:
|
||||
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
|
||||
commit_message: "feat(linter): apply linters fixes"
|
||||
|
||||
@@ -22,10 +22,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Retrieve artifacts
|
||||
id: download
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: artifacts
|
||||
- name: Check if job errored
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
exit "$(cat exitcode)";
|
||||
fi
|
||||
- name: Clone blackbox repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
if: ${{ steps.check.outputs.code == 2 }}
|
||||
with:
|
||||
repository: xaked/blackbox
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
known-hosts: ${{ secrets.ssh-known-hosts }}
|
||||
- name: Restore terraform cache
|
||||
if: ${{ steps.check.outputs.code == 2 }}
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
id: cache-terraform-restore
|
||||
with:
|
||||
path: .terraform
|
||||
@@ -91,7 +91,7 @@ jobs:
|
||||
run: terraform apply -input=false -auto-approve tfplan.binary;
|
||||
- name: Save terraform cache
|
||||
if: ${{ steps.check.outputs.code == 2 }}
|
||||
uses: actions/cache/save@v4
|
||||
uses: actions/cache/save@v5
|
||||
id: cache-terraform-save
|
||||
with:
|
||||
path: .terraform
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
- name: Install terraform docs
|
||||
@@ -25,14 +25,14 @@ jobs:
|
||||
terraform-docs --version
|
||||
terraform-docs markdown table --output-file README.md --output-mode inject .
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v19
|
||||
uses: tj-actions/verify-changed-files@v20
|
||||
id: verify-changed-files
|
||||
with:
|
||||
files: |
|
||||
README.md
|
||||
- name: Commit and push new terraform docs version
|
||||
if: steps.verify-changed-files.outputs.files_changed == 'true'
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
uses: stefanzweifel/git-auto-commit-action@v7
|
||||
with:
|
||||
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
|
||||
commit_message: "docs(tf-docs): update docs"
|
||||
|
||||
@@ -26,9 +26,9 @@ jobs:
|
||||
terraform_version: 1.7.5
|
||||
cli_config_credentials_token: ${{ secrets.tf-api-token }}
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Clone blackbox repo
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: xaked/blackbox
|
||||
path: blackbox
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
private-key-name: id_ed25519
|
||||
known-hosts: ${{ secrets.ssh-known-hosts }}
|
||||
- name: Restore terraform cache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
id: cache-terraform-restore
|
||||
with:
|
||||
path: .terraform
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
shell: bash
|
||||
run: printf "${{ steps.tfplan.outputs.exitcode }}" > exitcode;
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: artifacts
|
||||
path: |
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
exit 1;
|
||||
fi
|
||||
- name: Save terraform cache
|
||||
uses: actions/cache/save@v4
|
||||
uses: actions/cache/save@v5
|
||||
id: cache-terraform-save
|
||||
with:
|
||||
path: .terraform
|
||||
|
||||
15
cog.toml
Normal file
15
cog.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
# [packages]
|
||||
# build-docker-image = { path = ".gitea/workflows/build-docker-image.yml" }
|
||||
# cog-check = { path = ".gitea/workflows/cog-check.yml" }
|
||||
# cog-release = { path = ".gitea/workflows/cog-release.yml" }
|
||||
# otf-apply = { path = ".gitea/workflows/otf-apply.yml" }
|
||||
# otf-plan = { path = ".gitea/workflows/otf-plan.yml" }
|
||||
# sec-blackbox-decrypt = { path = ".gitea/workflows/sec-blackbox-decrypt.yml" }
|
||||
# sec-checks-trivy = { path = ".gitea/workflows/sec-checks-trivy.yml" }
|
||||
# sec-megalinter = { path = ".gitea/workflows/sec-megalinter.yml" }
|
||||
# tf-apply = { path = ".gitea/workflows/tf-apply.yml" }
|
||||
# tf-docs = { path = ".gitea/workflows/tf-docs.yml" }
|
||||
# tf-plan = { path = ".gitea/workflows/tf-plan.yml" }
|
||||
[commit_types]
|
||||
version = { bump_patch = true, changelog_title = "Version" }
|
||||
chore = { bump_patch = true, changelog_title = "Chore" }
|
||||
Reference in New Issue
Block a user