#19: silence the CI annotations and stop cancelling a run on every merge

Concurrency. release.yml calls ci.yml, so a push to main started the
called workflow and the standalone one, both landing in the concurrency
group ci-<ref>. One cancelled the other and every merge left a cancelled
run behind. main is now excluded from the push trigger: release.yml is
already the entry point there, and pull_request still covers changes
before they land.

Node 20 deprecation (23 warnings). Every action was pinned to a major
that still declares node20. Each replacement was checked by reading the
action.yml at the new tag and confirming "using: node24", and the inputs
in use were confirmed to still exist there:

  checkout v4->v7, setup-node v4->v7, setup-go v5->v7,
  upload-artifact v4->v7, download-artifact v4->v7,
  setup-buildx-action v3->v4, build-push-action v6->v7,
  login-action v3->v4, metadata-action v5->v6

download-artifact has a v8, but v7 is also node24 and matches the upload
side, so the pair stays on one major. trivy-action is a composite action
and has no Node runtime to deprecate.

Go cache (1 warning). setup-go looked for go.sum at the repository root
and skipped its cache: defaults.run.working-directory applies to run
steps, not to actions. cache-dependency-path now points at
services/protocols/go.sum.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5 committed 2026-08-02 08:20:19 -03:00
1 parent a9960d1c7c
commit 43dcea1ade
2 files changed
+37 -27

No files matched your search

+26 -16
View File
@@ -2,9 +2,14 @@ name: CI
# Runs on every branch and pull request. Publishing lives in release.yml and # Runs on every branch and pull request. Publishing lives in release.yml and
# only runs once this workflow has passed. # only runs once this workflow has passed.
#
# main is excluded from the push trigger on purpose: release.yml already calls
# this workflow there. Running both would put two jobs in the same concurrency
# group, and one would cancel the other - which is why every merge used to
# leave a cancelled CI run behind.
on: on:
push: push:
branches: ['**'] branches-ignore: [main]
pull_request: pull_request:
branches: [main] branches: [main]
workflow_call: workflow_call:
@@ -18,7 +23,7 @@ jobs:
name: Lint de idioma (R9) name: Lint de idioma (R9)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- run: node scripts/lang-lint.mjs - run: node scripts/lang-lint.mjs
go-protocols: go-protocols:
@@ -42,9 +47,14 @@ jobs:
run: run:
working-directory: services/protocols working-directory: services/protocols
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: actions/setup-go@v5 - uses: actions/setup-go@v7
with: { go-version-file: services/protocols/go.mod } with:
go-version-file: services/protocols/go.mod
# defaults.run.working-directory applies to run steps, not to
# actions, so setup-go looks for go.sum at the repository root and
# silently skips its cache without this.
cache-dependency-path: services/protocols/go.sum
- name: Run migrations - name: Run migrations
run: | run: |
docker run --rm --network host \ docker run --rm --network host \
@@ -65,8 +75,8 @@ jobs:
run: run:
working-directory: services/auth working-directory: services/auth
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: actions/setup-node@v4 - uses: actions/setup-node@v7
with: { node-version: "20" } with: { node-version: "20" }
- run: npm install - run: npm install
- run: npm run lint - run: npm run lint
@@ -79,8 +89,8 @@ jobs:
run: run:
working-directory: services/storage working-directory: services/storage
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: actions/setup-node@v4 - uses: actions/setup-node@v7
with: { node-version: "20" } with: { node-version: "20" }
- run: npm install - run: npm install
- run: npm run lint - run: npm run lint
@@ -93,8 +103,8 @@ jobs:
run: run:
working-directory: services/webmail working-directory: services/webmail
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: actions/setup-node@v4 - uses: actions/setup-node@v7
with: { node-version: "20" } with: { node-version: "20" }
- run: npm install - run: npm install
- run: npm run build - run: npm run build
@@ -103,7 +113,7 @@ jobs:
name: Trivy (dependências, segredos e Dockerfiles) name: Trivy (dependências, segredos e Dockerfiles)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
# A mail server holds credentials for every mailbox it serves, so the # A mail server holds credentials for every mailbox it serves, so the
# secret scanner matters as much as the vulnerability one here: a DKIM # secret scanner matters as much as the vulnerability one here: a DKIM
@@ -125,14 +135,14 @@ jobs:
matrix: matrix:
service: [protocols, auth, storage, webmail] service: [protocols, auth, storage, webmail]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v4
# Built but not pushed: this proves each Dockerfile still works on every # Built but not pushed: this proves each Dockerfile still works on every
# branch, while publishing stays in release.yml. # branch, while publishing stays in release.yml.
- name: Build - name: Build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: services/${{ matrix.service }} context: services/${{ matrix.service }}
push: false push: false
@@ -153,7 +163,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [go-protocols, ts-auth, ts-storage, webmail-build] needs: [go-protocols, ts-auth, ts-storage, webmail-build]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- run: cp .env.example .env - run: cp .env.example .env
# The proxy network is declared external because Coolify owns it on the # The proxy network is declared external because Coolify owns it on the
# deploy host. Nothing creates it here, and without it compose refuses to # deploy host. Nothing creates it here, and without it compose refuses to
+11 -11
View File
@@ -60,12 +60,12 @@ jobs:
runner: ubuntu-24.04-arm runner: ubuntu-24.04-arm
arch: arm64 arch: arm64
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v4
- name: Autentica no GHCR - name: Autentica no GHCR
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@@ -73,7 +73,7 @@ jobs:
- name: Metadados - name: Metadados
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: ${{ env.REGISTRY }}/${{ needs.prepare.outputs.namespace }}/${{ matrix.service }} images: ${{ env.REGISTRY }}/${{ needs.prepare.outputs.namespace }}/${{ matrix.service }}
@@ -81,7 +81,7 @@ jobs:
# architectures exist and can be joined into a single manifest list. # architectures exist and can be joined into a single manifest list.
- name: Build e push por digest - name: Build e push por digest
id: build id: build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: services/${{ matrix.service }} context: services/${{ matrix.service }}
platforms: ${{ matrix.platform }} platforms: ${{ matrix.platform }}
@@ -99,7 +99,7 @@ jobs:
touch "/tmp/digests/${digest#sha256:}" touch "/tmp/digests/${digest#sha256:}"
- name: Guarda o digest - name: Guarda o digest
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v7
with: with:
# Slashes are not allowed in artifact names, hence the arch alias. # Slashes are not allowed in artifact names, hence the arch alias.
name: digest-${{ matrix.service }}-${{ matrix.arch }} name: digest-${{ matrix.service }}-${{ matrix.arch }}
@@ -119,19 +119,19 @@ jobs:
matrix: matrix:
service: [protocols, auth, storage, webmail] service: [protocols, auth, storage, webmail]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v4
- name: Autentica no GHCR - name: Autentica no GHCR
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Recupera os digests - name: Recupera os digests
uses: actions/download-artifact@v4 uses: actions/download-artifact@v7
with: with:
pattern: digest-${{ matrix.service }}-* pattern: digest-${{ matrix.service }}-*
merge-multiple: true merge-multiple: true
@@ -142,7 +142,7 @@ jobs:
# release; the sha tag does the same for any main build. # release; the sha tag does the same for any main build.
- name: Metadados - name: Metadados
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: ${{ env.REGISTRY }}/${{ needs.prepare.outputs.namespace }}/${{ matrix.service }} images: ${{ env.REGISTRY }}/${{ needs.prepare.outputs.namespace }}/${{ matrix.service }}
tags: | tags: |