Skip to content

Commit b787bed

Browse files
rename master to main (#21)
Co-authored-by: cloudpossebot <[email protected]>
1 parent 7f791c0 commit b787bed

File tree

3 files changed

+102
-102
lines changed

3 files changed

+102
-102
lines changed

.github/mergify.yml

+51-51
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
# https://docs.mergify.io/conditions.html
22
# https://docs.mergify.io/actions.html
33
pull_request_rules:
4-
- name: "approve automated PRs that have passed checks"
5-
conditions:
6-
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
7-
- "base=master"
8-
- "-closed"
9-
- "head~=^(auto-update|renovate)/.*"
10-
- "check-success=test/bats"
11-
- "check-success=test/readme"
12-
- "check-success=test/terratest"
13-
- "check-success=validate-codeowners"
14-
actions:
15-
review:
16-
type: "APPROVE"
17-
bot_account: "cloudposse-mergebot"
18-
message: "We've automatically approved this PR because the checks from the automated Pull Request have passed."
4+
- name: "approve automated PRs that have passed checks"
5+
conditions:
6+
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
7+
- "base=main"
8+
- "-closed"
9+
- "head~=^(auto-update|renovate)/.*"
10+
- "check-success=test/bats"
11+
- "check-success=test/readme"
12+
- "check-success=test/terratest"
13+
- "check-success=validate-codeowners"
14+
actions:
15+
review:
16+
type: "APPROVE"
17+
bot_account: "cloudposse-mergebot"
18+
message: "We've automatically approved this PR because the checks from the automated Pull Request have passed."
1919

20-
- name: "merge automated PRs when approved and tests pass"
21-
conditions:
22-
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
23-
- "base=master"
24-
- "-closed"
25-
- "head~=^(auto-update|renovate)/.*"
26-
- "check-success=test/bats"
27-
- "check-success=test/readme"
28-
- "check-success=test/terratest"
29-
- "check-success=validate-codeowners"
30-
- "#approved-reviews-by>=1"
31-
- "#changes-requested-reviews-by=0"
32-
- "#commented-reviews-by=0"
33-
actions:
34-
merge:
35-
method: "squash"
20+
- name: "merge automated PRs when approved and tests pass"
21+
conditions:
22+
- "author~=^(cloudpossebot|renovate\\[bot\\])$"
23+
- "base=main"
24+
- "-closed"
25+
- "head~=^(auto-update|renovate)/.*"
26+
- "check-success=test/bats"
27+
- "check-success=test/readme"
28+
- "check-success=test/terratest"
29+
- "check-success=validate-codeowners"
30+
- "#approved-reviews-by>=1"
31+
- "#changes-requested-reviews-by=0"
32+
- "#commented-reviews-by=0"
33+
actions:
34+
merge:
35+
method: "squash"
3636

37-
- name: "delete the head branch after merge"
38-
conditions:
39-
- "merged"
40-
actions:
41-
delete_head_branch: {}
37+
- name: "delete the head branch after merge"
38+
conditions:
39+
- "merged"
40+
actions:
41+
delete_head_branch: {}
4242

43-
- name: "ask to resolve conflict"
44-
conditions:
45-
- "conflict"
46-
- "-closed"
47-
actions:
48-
comment:
49-
message: "This pull request is now in conflict. Could you fix it @{{author}}? 🙏"
43+
- name: "ask to resolve conflict"
44+
conditions:
45+
- "conflict"
46+
- "-closed"
47+
actions:
48+
comment:
49+
message: "This pull request is now in conflict. Could you fix it @{{author}}? 🙏"
5050

51-
- name: "remove outdated reviews"
52-
conditions:
53-
- "base=master"
54-
actions:
55-
dismiss_reviews:
56-
changes_requested: true
57-
approved: true
58-
message: "This Pull Request has been updated, so we're dismissing all reviews."
51+
- name: "remove outdated reviews"
52+
conditions:
53+
- "base=main"
54+
actions:
55+
dismiss_reviews:
56+
changes_requested: true
57+
approved: true
58+
message: "This Pull Request has been updated, so we're dismissing all reviews."

.github/workflows/auto-context.yml

+42-42
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
name: "auto-context"
22
on:
33
schedule:
4-
# Update context.tf nightly
5-
- cron: '0 3 * * *'
4+
# Update context.tf nightly
5+
- cron: "0 3 * * *"
66

77
jobs:
88
update:
99
if: github.event_name == 'schedule'
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v2
1313

14-
- name: Update context.tf
15-
shell: bash
16-
id: update
17-
env:
18-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
19-
run: |
20-
if [[ -f context.tf ]]; then
21-
echo "Discovered existing context.tf! Fetching most recent version to see if there is an update."
22-
curl -o context.tf -fsSL https://raw.githubusercontent.com/cloudposse/terraform-null-label/master/exports/context.tf
23-
if git diff --no-patch --exit-code context.tf; then
24-
echo "No changes detected! Exiting the job..."
14+
- name: Update context.tf
15+
shell: bash
16+
id: update
17+
env:
18+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
19+
run: |
20+
if [[ -f context.tf ]]; then
21+
echo "Discovered existing context.tf! Fetching most recent version to see if there is an update."
22+
curl -o context.tf -fsSL https://raw.githubusercontent.com/cloudposse/terraform-null-label/main/exports/context.tf
23+
if git diff --no-patch --exit-code context.tf; then
24+
echo "No changes detected! Exiting the job..."
25+
else
26+
echo "context.tf file has changed. Update examples and rebuild README.md."
27+
make init
28+
make github/init/context.tf
29+
make readme/build
30+
echo "::set-output name=create_pull_request::true"
31+
fi
2532
else
26-
echo "context.tf file has changed. Update examples and rebuild README.md."
27-
make init
28-
make github/init/context.tf
29-
make readme/build
30-
echo "::set-output name=create_pull_request::true"
33+
echo "This module has not yet been updated to support the context.tf pattern! Please update in order to support automatic updates."
3134
fi
32-
else
33-
echo "This module has not yet been updated to support the context.tf pattern! Please update in order to support automatic updates."
34-
fi
3535
36-
- name: Create Pull Request
37-
if: steps.update.outputs.create_pull_request == 'true'
38-
uses: cloudposse/actions/github/[email protected]
39-
with:
40-
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
41-
committer: 'cloudpossebot <[email protected]>'
42-
author: 'cloudpossebot <[email protected]>'
43-
commit-message: Update context.tf from origin source
44-
title: Update context.tf
45-
body: |-
46-
## what
47-
This is an auto-generated PR that updates the `context.tf` file to the latest version from `cloudposse/terraform-null-label`
36+
- name: Create Pull Request
37+
if: steps.update.outputs.create_pull_request == 'true'
38+
uses: cloudposse/actions/github/[email protected]
39+
with:
40+
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
41+
committer: "cloudpossebot <[email protected]>"
42+
author: "cloudpossebot <[email protected]>"
43+
commit-message: Update context.tf from origin source
44+
title: Update context.tf
45+
body: |-
46+
## what
47+
This is an auto-generated PR that updates the `context.tf` file to the latest version from `cloudposse/terraform-null-label`
4848
49-
## why
50-
To support all the features of the `context` interface.
49+
## why
50+
To support all the features of the `context` interface.
5151
52-
branch: auto-update/context.tf
53-
base: master
54-
delete-branch: true
55-
labels: |
56-
auto-update
57-
context
52+
branch: auto-update/context.tf
53+
base: main
54+
delete-branch: true
55+
labels: |
56+
auto-update
57+
context

.github/workflows/auto-release.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ name: auto-release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
jobs:
99
publish:
1010
runs-on: ubuntu-latest
1111
steps:
12-
# Drafts your next Release notes as Pull Requests are merged into "master"
13-
- uses: release-drafter/release-drafter@v5
14-
with:
15-
publish: true
16-
prerelease: false
17-
config-name: auto-release.yml
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
12+
# Drafts your next Release notes as Pull Requests are merged into "main"
13+
- uses: release-drafter/release-drafter@v5
14+
with:
15+
publish: true
16+
prerelease: false
17+
config-name: auto-release.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)