From 19a471641c55ac4accbf9370eae0b7bdfc69c244 Mon Sep 17 00:00:00 2001 From: Cristina Borges Date: Thu, 7 May 2026 14:00:56 +0100 Subject: [PATCH 1/3] ci: boostrap Github Actions with lint and secrets jobs --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ LICENSE | 3 ++- README.md | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ea91a7a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Run actionlint + run: | + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + ./actionlint -color + - name: Run markdownlint + run: | + npm install -g markdownlint-cli2 + + markdownlint-cli2 "**/*.md" + + - name: Run yamllint + run: | + pip install yamllint + yamllint . + + secrets: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run gitleaks + uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 1ae54ba..223e1bd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,4 @@ + MIT License Copyright (c) 2026 Cristina Borges @@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index 28e13aa..7063691 100644 --- a/README.md +++ b/README.md @@ -47,4 +47,4 @@ See `docs/ARCHITECTURE.md` once it lands. ## License -MIT. See `LICENSE`. \ No newline at end of file +MIT. See `LICENSE`. From b9d4097fa36980163db5bd5d81e3899c2abc3b24 Mon Sep 17 00:00:00 2001 From: Cristina Borges Date: Thu, 7 May 2026 14:18:36 +0100 Subject: [PATCH 2/3] ci: add markdownlint and yamllint configs to fix workflow whitespace --- .markdownlint.yaml | 3 +++ .yamllint | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 .markdownlint.yaml create mode 100644 .yamllint diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..b57d17d --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,3 @@ +# Markdownlint config issue — keeps default rules except line-length. +default: true +MD013: false \ No newline at end of file diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..3634bb2 --- /dev/null +++ b/.yamllint @@ -0,0 +1,8 @@ +# .yamllint — sensible defaults for GitHub Actions workflows +extends: default +rules: + truthy: + allowed-values: ['true', 'false', 'on', 'off'] + line-length: + max: 120 + document-start: disable \ No newline at end of file From faaf6799153df189431d292aa7a692b239b7c065 Mon Sep 17 00:00:00 2001 From: Cristina Borges Date: Thu, 7 May 2026 14:40:52 +0100 Subject: [PATCH 3/3] ci: fix yamllint --- .github/workflows/ci.yml | 10 +++++----- .markdownlint.yaml | 2 +- .yamllint | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea91a7a..9b81cd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: +on: push: branches: [main] pull_request: @@ -13,15 +13,15 @@ permissions: jobs: lint: runs-on: ubuntu-latest - steps: + steps: - name: Checkout code uses: actions/checkout@v4 - - name: Run actionlint + - name: Run actionlint run: | bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) ./actionlint -color - name: Run markdownlint - run: | + run: | npm install -g markdownlint-cli2 markdownlint-cli2 "**/*.md" @@ -42,4 +42,4 @@ jobs: - name: Run gitleaks uses: gitleaks/gitleaks-action@v2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.markdownlint.yaml b/.markdownlint.yaml index b57d17d..89bd30b 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,3 +1,3 @@ # Markdownlint config issue — keeps default rules except line-length. default: true -MD013: false \ No newline at end of file +MD013: false diff --git a/.yamllint b/.yamllint index 3634bb2..44644ab 100644 --- a/.yamllint +++ b/.yamllint @@ -5,4 +5,4 @@ rules: allowed-values: ['true', 'false', 'on', 'off'] line-length: max: 120 - document-start: disable \ No newline at end of file + document-start: disable