Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* @articulate/devex

# Allow Botzo to approve dependency bumps (and related updates)
/.github/workflows/ @articulate/devex @botzo
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ updates:
directory: /
schedule:
interval: monthly
commit-message:
prefix: ci
groups:
actions:
patterns:
- "*"
28 changes: 28 additions & 0 deletions .github/workflows/auto-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto-merge Dependencies

on:
pull_request:

jobs:
auto-merge:
runs-on: ${{ vars.RUNNER_SMALL }}
if: >
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'articulate-automation[bot]'
steps:
- uses: actions/create-github-app-token@v3
id: token
with:
client-id: ${{ vars.AUTOMATION_CLIENT_ID }}
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
- name: Approve PR
env:
# Approve as Botzo to work around CODEOWNERS requirement
GH_TOKEN: ${{ secrets.BOTZO_GH_TOKEN }}
PR: ${{ github.event.pull_request.number }}
run: gh pr review --approve "$PR" -R "$GITHUB_REPOSITORY"
- name: Enable auto-merge
env:
GH_TOKEN: ${{ steps.token.outputs.token }}
PR: ${{ github.event.pull_request.number }}
run: gh pr merge --auto --squash "$PR" -R "$GITHUB_REPOSITORY"
29 changes: 19 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@ name: Build

on:
pull_request:
merge_group:
push:
branches:
- main
schedule:
- cron: '0 0 * * 1-6'
- cron: '0 0 * * 0' # runs with no-cache
- cron: "0 0 * * 1-6"
- cron: "0 0 * * 0" # runs with no-cache
workflow_dispatch:
inputs:
no-cache:
description: 'Skip Docker cache'
description: "Skip Docker cache"
type: boolean
default: false

jobs:
setup:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- name: Find Dockerfiles
Expand Down Expand Up @@ -50,17 +51,25 @@ jobs:
- uses: docker/build-push-action@v7
with:
context: ${{ steps.meta.outputs.context }}
pull: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' }}
pull: ${{ github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
push: ${{ github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64/v8
cache-from: type=registry,ref=${{ steps.meta.outputs.cache }}
cache-to: type=inline
no-cache: ${{ github.event.schedule == '0 0 * * 0' || (github.event_name == 'workflow_dispatch' && inputs.no-cache) }}
build-complete:
if: always()
runs-on: ubuntu-slim
needs: [build]
steps:
- name: Verify build succeeded
run: |
[ "${{ needs.build.result }}" = "success" ] || exit 1
dockerhub:
runs-on: ubuntu-latest
runs-on: ubuntu-slim

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! I keep forgetting to try slim more

needs: build
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.event_name != 'merge_group'
steps:
- uses: actions/checkout@v6
- uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # pin@v4
Expand All @@ -70,8 +79,8 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
short-description: ${{ github.event.repository.description }}
notify:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
needs: build
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.event_name != 'merge_group'
steps:
- run: curl ${{ secrets.DMS_URL }}
14 changes: 12 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Lint

on: pull_request
on:
pull_request:
merge_group:

jobs:
setup:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
- name: Find Dockerfiles
Expand All @@ -25,3 +27,11 @@ jobs:
with:
dockerfile: ${{ matrix.dockerfile }}
ignore: DL3008,DL3016,DL3033,DL3041
lint-complete:
if: always()
runs-on: ubuntu-slim
needs: [lint]
steps:
- name: Verify lint succeeded
run: |
[ "${{ needs.lint.result }}" = "success" ] || exit 1
Loading