From 993fa6ba2d222ab063491648b6098a665639def1 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Wed, 24 Apr 2024 16:00:47 +0800 Subject: [PATCH 1/2] ci: use $default-branch placeholder instead of hard-coded main --- .github/workflows/ci.yml | 2 +- .github/workflows/commitlint.yml | 2 +- .github/workflows/devcontainer.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f90f796..dc8c6e77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,4 +54,4 @@ on: - synchronize push: branches: - - main + - $default-branch diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index feb94f8e..acdeba94 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -25,4 +25,4 @@ on: - edited push: branches: - - main + - $default-branch diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index e1fea79c..96758cfa 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -40,7 +40,7 @@ jobs: on: push: branches: - - main + - $default-branch paths: - .devcontainer/Dockerfile - .devcontainer/Dockerfile.dockerignore From 57799d1a7ebe011bca55da3ea30997708db1a348 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Wed, 24 Apr 2024 16:03:12 +0800 Subject: [PATCH 2/2] update template --- .../workflows/ci.yml.jinja | 2 +- .../workflows/commitlint.yml | 2 +- .../workflows/devcontainer.yml.jinja | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja index ed5f4d90..bd9358c4 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja @@ -67,4 +67,4 @@ on: - synchronize push: branches: - - main + - $default-branch diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/commitlint.yml b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/commitlint.yml index feb94f8e..acdeba94 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/commitlint.yml +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/commitlint.yml @@ -25,4 +25,4 @@ on: - edited push: branches: - - main + - $default-branch diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja index 79818440..f41949fd 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/devcontainer.yml.jinja @@ -51,7 +51,7 @@ jobs: on: push: branches: - - main + - $default-branch paths: - .devcontainer/Dockerfile - .devcontainer/Dockerfile.dockerignore