git » chasquid » commit 6ff08b1

ci: Rename `master` branch to `main`

author Alberto Bertogli
2024-04-19 17:57:30 UTC
committer Alberto Bertogli
2024-04-19 17:57:30 UTC
parent 7a2e49c84931de18eec4da2ddd8148d64f5f4582

ci: Rename `master` branch to `main`

These days `main` is more common, and I find it more intuitive.

.github/workflows/codeql-analysis.yml +2 -2
.github/workflows/docker.yml +4 -4
.github/workflows/gotests.yml +2 -2
.github/workflows/govulncheck.yml +2 -2
README.md +1 -1
docker/README.md +4 -4

diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 5116c92..6fc47e0 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -2,10 +2,10 @@ name: "CodeQL"
 
 on:
   push:
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
   pull_request:
     # The branches below must be a subset of the branches above
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
   schedule:
     - cron: '29 21 * * 6'
 
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 57bc7da..9b12e51 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -2,11 +2,11 @@ name: "docker"
 
 on:
   push:
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
     tags: [ "v*", "test-tag-*" ]
   pull_request:
     # The branches below must be a subset of the branches above
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
   schedule:
     - cron: '29 21 * * 6'
 
@@ -77,7 +77,7 @@ jobs:
           docker tag chasquid index.docker.io/${{ secrets.DOCKER_REGISTRY_USER }}/chasquid:$GITHUB_REF_NAME
           docker push index.docker.io/${{ secrets.DOCKER_REGISTRY_USER }}/chasquid:$GITHUB_REF_NAME
       - name: Dockerhub tag latest
-        if: env.HAS_DOCKER && env.GITHUB_REF_NAME == 'master'
+        if: env.HAS_DOCKER && env.GITHUB_REF_NAME == 'main'
         run: |
           docker tag chasquid index.docker.io/${{ secrets.DOCKER_REGISTRY_USER }}/chasquid:latest
           docker push index.docker.io/${{ secrets.DOCKER_REGISTRY_USER }}/chasquid:latest
@@ -96,7 +96,7 @@ jobs:
           docker tag chasquid registry.gitlab.com/albertito/chasquid:$GITHUB_REF_NAME
           docker push registry.gitlab.com/albertito/chasquid:$GITHUB_REF_NAME
       - name: Gitlab tag latest
-        if: env.HAS_GITLAB && env.GITHUB_REF_NAME == 'master'
+        if: env.HAS_GITLAB && env.GITHUB_REF_NAME == 'main'
         run: |
           docker tag chasquid registry.gitlab.com/albertito/chasquid:latest
           docker push registry.gitlab.com/albertito/chasquid:latest
diff --git a/.github/workflows/gotests.yml b/.github/workflows/gotests.yml
index 2cb2256..a89560a 100644
--- a/.github/workflows/gotests.yml
+++ b/.github/workflows/gotests.yml
@@ -2,10 +2,10 @@ name: "gotests"
 
 on:
   push:
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
   pull_request:
     # The branches below must be a subset of the branches above
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
   schedule:
     - cron: '29 21 * * 6'
 
diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml
index 39b9b4a..91c3ae1 100644
--- a/.github/workflows/govulncheck.yml
+++ b/.github/workflows/govulncheck.yml
@@ -2,10 +2,10 @@ name: "govulncheck"
 
 on:
   push:
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
   pull_request:
     # The branches below must be a subset of the branches above
-    branches: [ "master", "next" ]
+    branches: [ "main", "next" ]
   schedule:
     - cron: '29 21 * * 6'
 
diff --git a/README.md b/README.md
index a220945..3f51fc2 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ It is designed mainly for individuals and small groups.
 It's written in [Go](https://golang.org), and distributed under the
 [Apache license 2.0](http://en.wikipedia.org/wiki/Apache_License).
 
-[![Go tests](https://github.com/albertito/chasquid/actions/workflows/gotests.yml/badge.svg?branch=master)](https://github.com/albertito/chasquid/actions)
+[![Go tests](https://github.com/albertito/chasquid/actions/workflows/gotests.yml/badge.svg?branch=main)](https://github.com/albertito/chasquid/actions)
 [![Go Report Card](https://goreportcard.com/badge/github.com/albertito/chasquid)](https://goreportcard.com/report/github.com/albertito/chasquid)
 [![Coverage](https://coveralls.io/repos/github/albertito/chasquid/badge.svg?branch=next)](https://coveralls.io/github/albertito/chasquid?branch=next)  
 [![Docs](https://img.shields.io/badge/docs-reference-blue.svg)](https://blitiri.com.ar/p/chasquid/)
diff --git a/docker/README.md b/docker/README.md
index cee30f5..38c7cb0 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -18,7 +18,7 @@ There are pre-built images at the
 [gitlab registry](https://gitlab.com/albertito/chasquid/container_registry)
 and [dockerhub](https://hub.docker.com/r/albertito/chasquid).
 They are automatically built, and tagged with the corresponding branch name.
-Use the *master* tag for a stable version.
+Use the *main* tag for a stable version.
 
 If, instead, you want to build the image yourself, just run:
 
@@ -32,7 +32,7 @@ $ docker build -t chasquid -f docker/Dockerfile .
 First, pull the image into your target machine:
 
 ```sh
-$ docker pull registry.gitlab.com/albertito/chasquid:master
+$ docker pull registry.gitlab.com/albertito/chasquid:main
 ```
 
 You will need a data volume to store persistent data, outside the image. This
@@ -48,7 +48,7 @@ To add your first user to the image:
 $ docker run \
 	--mount source=chasquid-data,target=/data \
 	-it --entrypoint=/add-user.sh \
-	registry.gitlab.com/albertito/chasquid:master
+	registry.gitlab.com/albertito/chasquid:main
 Email (full user@domain format): pepe@example.com
 Password:
 pepe@example.com added to /data/dovecot/users
@@ -71,7 +71,7 @@ Finally, start the container:
 $ docker run -e AUTO_CERTS=mail.yourdomain.com \
 	--mount source=chasquid-data,target=/data \
 	--network host \
-	registry.gitlab.com/albertito/chasquid:master
+	registry.gitlab.com/albertito/chasquid:main
 ```