Skip to content

Commit 2d81203

Browse files
authored
chore: migrate CI pipeline from master to main branch (#122)
Replace all hardcoded 'master' branch references with 'main' in: - CI.yml (trigger branches + refs/heads/main conditions) - snyk-container-analysis.yml (trigger branches) - release-drafter.yml (trigger branch + commitish) - dockerhub-description.yml (trigger branch)
1 parent 9e16832 commit 2d81203

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/CI.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
paths:
77
- 'Dockerfile*'
88
- 'docker-bake.hcl'
99
- '.github/workflows/CI.yml'
1010
pull_request:
11-
branches: [ master ]
11+
branches: [ main ]
1212
paths:
1313
- 'Dockerfile*'
1414
- 'docker-bake.hcl'
@@ -56,15 +56,15 @@ jobs:
5656
run: docker buildx bake --file docker-bake.hcl ${{ matrix.target }}
5757

5858
- name: Login container registries
59-
if: github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch'
59+
if: github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch'
6060
run: |
6161
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
6262
echo '${{ secrets.DOCKER_PASSWORD }}' | docker login -u '${{ secrets.DOCKER_USERNAME }}' --password-stdin
6363
6464
- name: Publish image for tag ${{ matrix.target }}
65-
if: github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch'
65+
if: github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch'
6666
run: docker buildx bake --file docker-bake.hcl ${{ matrix.target }} --push
6767

6868
- name: Remove builder instances
69-
if: github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch'
69+
if: github.ref == 'refs/heads/main' && github.event_name == 'workflow_dispatch'
7070
run: docker buildx rm --all-inactive --force

.github/workflows/dockerhub-description.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Update Docker Hub Description
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
paths:
88
- README.md
99
- .github/workflows/dockerhub-description.yml

.github/workflows/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release Drafter
33
on:
44
push:
55
branches:
6-
- "master"
6+
- "main"
77
workflow_dispatch:
88

99
permissions: {}
@@ -15,4 +15,4 @@ jobs:
1515
pull-requests: read
1616
uses: cpp-linter/.github/.github/workflows/release-drafter.yml@main
1717
with:
18-
commitish: master
18+
commitish: main

.github/workflows/snyk-container-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ name: Snyk Container
1010

1111
on:
1212
push:
13-
branches: [ master ]
13+
branches: [ main ]
1414
paths:
1515
- 'Dockerfile*'
1616
- '.github/workflows/snyk-container-analysis.yml'
1717
pull_request:
18-
branches: [ master ]
18+
branches: [ main ]
1919
paths:
2020
- 'Dockerfile*'
2121
- '.github/workflows/snyk-container-analysis.yml'

0 commit comments

Comments
 (0)