From c8cdc1ea7bfaaeb086a17c06583e4b2ace1b85f9 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Tue, 29 Apr 2025 16:34:29 -0300 Subject: [PATCH 1/3] ci: switch to reusable workflows --- .github/workflows/docker-build.yml | 9 +++++++++ .github/workflows/docker.yml | 14 -------------- .github/workflows/lint-and-test.yml | 11 +++++++++++ .github/workflows/lint-build.yml | 29 ---------------------------- .github/workflows/release-please.yml | 8 ++------ package.json | 3 ++- 6 files changed, 24 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/docker-build.yml delete mode 100644 .github/workflows/docker.yml create mode 100644 .github/workflows/lint-and-test.yml delete mode 100644 .github/workflows/lint-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 00000000..638ad966 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,9 @@ +name: Docker build + +on: + push: + branches: [main] + +jobs: + docker-build: + uses: inclusive-design/workflows/.github/workflows/docker-build.yml@main diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 57a071dc..00000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Docker build - -on: - pull_request: - branches: [main] - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Build with Docker - run: docker build . - diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml new file mode 100644 index 00000000..3e0311b8 --- /dev/null +++ b/.github/workflows/lint-and-test.yml @@ -0,0 +1,11 @@ +name: Lint and test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint-and-test: + uses: inclusive-design/workflows/.github/workflows/node-lint-and-test.yml@main diff --git a/.github/workflows/lint-build.yml b/.github/workflows/lint-build.yml deleted file mode 100644 index 5a2615a5..00000000 --- a/.github/workflows/lint-build.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Lint and build - -on: - pull_request: - branches: [main] - -jobs: - lint-build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Cache node modules - uses: actions/cache@v4 - with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} - - name: Install dependencies - run: npm install - env: - CI: true - - name: Lint files - run: npm run lint - env: - CI: true - - name: Build site - run: npm run build - env: - CI: true - diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 85d10fdd..8d89c77b 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -6,9 +6,5 @@ on: jobs: release-please: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v4 - id: release - with: - token: ${{ secrets.GITHUB_TOKEN }} + uses: inclusive-design/workflows/.github/workflows/release-please.yml@main + secrets: inherit diff --git a/package.json b/package.json index 562b234d..1b503a26 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "lint:yml": "eslint \"**/*.yml\"", "start": "npm-run-all -l clean -p start:*", "start:eleventy": "run-p dev cms", - "prepare": "husky" + "prepare": "husky", + "test": "echo \"No test specified\" && exit 0" }, "repository": { "type": "git", From 69309c4aaa6328a55f2db240e29f307164b817df Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Tue, 29 Apr 2025 16:37:59 -0300 Subject: [PATCH 2/3] ci: build on push --- .github/workflows/docker-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 638ad966..97a772c9 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -3,6 +3,8 @@ name: Docker build on: push: branches: [main] + pull_request: + branches: [main] jobs: docker-build: From daa27e1cebe0cde992498534cd519b9196f6bf10 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 30 Apr 2025 15:35:55 -0300 Subject: [PATCH 3/3] ci: use secrets properly --- .github/workflows/release-please.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 8d89c77b..c6d58cea 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -7,4 +7,7 @@ on: jobs: release-please: uses: inclusive-design/workflows/.github/workflows/release-please.yml@main - secrets: inherit + with: + GHA_APP_ID: ${{ vars.GHA_APP_ID }} + secrets: + GHA_PRIVATE_KEY: ${{ secrets.GHA_PRIVATE_KEY }}