Skip to content

Commit

Permalink
KineticCafe/deployment v1.5.0
Browse files Browse the repository at this point in the history
Adopted bobheadxi/deployments as KineticCafe/deployments, mostly to use
Node 20 as required by GitHub.

```diff
- uses: bobheadxi/deployments@v1
+ uses: KineticCafe/deployments@v1
```

We recommend using a more specific version tag:

```diff
- uses: bobheadxi/deployments@v1
+ uses: KineticCafe/[email protected]
```

- Switch from `npm` to `pnpm`

- Switch from `prettier` to `biome`.

- Upgrade to Typescript 5, @actions/github 6 and other dependencies.

- **Upgraded to use Node 20.**

- Apply bobheadxi#152 to allow required status contexts and
  auto merge.

  Changes were made to make the values cleaner and fix some incorrect
  assumptions.

- Apply bobheadxi/deploys#159 to add a warning when `delete-env` fails.

- Remove makefile

- Add a changelog file.
  • Loading branch information
halostatue committed Mar 11, 2024
1 parent 8a87bc3 commit be50249
Show file tree
Hide file tree
Showing 33 changed files with 1,906 additions and 1,196 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dist/* linguist-generated
dist/* linguist-generated -diff
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

- package-ecosystem: npm
directory: /
schedule:
interval: "monthly"
commit-message:
prefix: "deps"
interval: monthly
69 changes: 32 additions & 37 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,42 @@ name: cleanup

on:
pull_request:
types: [ closed ]
types: [closed]

jobs:
delete-env:
runs-on: ubuntu-latest
strategy:
matrix:
scenario: [ 'success', 'failure' ]
scenario: ['success', 'failure']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'

# Dependencies
# https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm install
- run: npm run build

- name: extract branch name
id: get_branch
shell: bash
env:
PR_HEAD: ${{ github.head_ref }}
run: echo "##[set-output name=branch;]$(echo ${PR_HEAD#refs/heads/} | tr / -)"

- name: delete environment
uses: ./
with:
step: delete-env
token: ${{ secrets.GITHUB_TOKEN }}
env: integration-test-${{ steps.get_branch.outputs.branch }}-${{ matrix.scenario }}
debug: true
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 8

- uses: actions/[email protected]
with:
node-version: 20.x
cache: pnpm

- run: pnpm install --frozen-lockfile

- run: |
pnpm run build
pnpm run package
- name: extract branch name
id: get_branch
run: |
echo "branch=$(${PR_HEAD#refs/heads/} | tr / -)" >>"$GITHUB_OUTPUT"
env:
PR_HEAD: ${{ github.head_ref }}

- name: delete environment
uses: ./
with:
env: integration-test-${{ steps.get_branch.outputs.branch }}-${{ matrix.scenario }}
step: delete-env
debug: true
17 changes: 17 additions & 0 deletions .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check DCO

on:
pull_request:

jobs:
check-dco:
name: Check DCO
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: KineticCafe/[email protected]
with:
exempt-authors: |
@kineticcommerce.com
@kineticcafe.com
18 changes: 18 additions & 0 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Dependabot auto-merge

on:
pull_request:

permissions:
contents: write
pull-requests: write

jobs:
dependabot-automerge:
runs-on: ubuntu-latest

steps:
- uses: KineticCafe/actions/[email protected]
with:
update-type: minor
merge-type: rebase
Loading

0 comments on commit be50249

Please sign in to comment.