|
2 | 2 |
|
3 | 3 | This repository contains GitHub Actions workflows that: |
4 | 4 |
|
5 | | -- build and push Docker images to Docker Hub when commits are pushed to the `master` branch |
6 | | -- create a semantic version tag and publish a GitHub Release when a pull request is merged into `master` |
| 5 | +- create a semantic version tag when a pull request is merged into `master` |
| 6 | +- build and push Docker images to Docker Hub using that generated release tag |
| 7 | +- publish a GitHub Release for the generated tag |
7 | 8 |
|
8 | 9 | ## What the workflow does |
9 | | -- On push to `master`, it builds two images: |
10 | | - - `Dockerfile.postgres-walg` → `DOCKERHUB_USERNAME/pg-with-backup` (tags: `latest`, `commit-sha`) |
11 | | - - `Dockerfile.backup` → `DOCKERHUB_USERNAME/pg-backup-walg` (tags: `latest`, `commit-sha`) |
12 | | -- Pushes the images to Docker Hub using the provided credentials. |
13 | 10 | - On merged pull requests to `master`, it: |
14 | 11 | - calculates the next semantic version tag from the latest repository tag (current baseline: `v2.3.0`) |
15 | 12 | - defaults to a patch bump, unless the merge commit message includes `#major`, `#minor`, `#patch`, or `#none` |
| 13 | + - skips Docker image build/push when the merge commit message includes `#skip-docker` (`:noimage`) |
16 | 14 | - creates the new Git tag with `anothrNick/github-tag-action` |
| 15 | + - builds two images and pushes them to Docker Hub with tags `latest` and the generated semantic version tag: |
| 16 | + - `Dockerfile.postgres-walg` → `DOCKERHUB_USERNAME/pg-with-backup` |
| 17 | + - `Dockerfile.backup` → `DOCKERHUB_USERNAME/pg-backup-walg` |
17 | 18 | - publishes a GitHub Release with autogenerated release notes and a small metadata asset |
18 | 19 |
|
19 | 20 | ## Required GitHub repository secrets |
|
55 | 56 |
|
56 | 57 | ## Customizing image names/tags |
57 | 58 | - The workflow uses `${{ secrets.DOCKERHUB_USERNAME }}` as the user/org for image tags. If you prefer different names, update `.github/workflows/build-and-push.yml`. |
58 | | -- The release workflow lives in `.github/workflows/release-on-master-merge.yml`. |
| 59 | +- The release workflow lives in `.github/workflows/release-on-master-merge.yml` and calls `.github/workflows/build-and-push.yml` as a reusable workflow. |
59 | 60 | - To change default semantic bump behavior, update `DEFAULT_BUMP` in the release workflow. |
| 61 | +- To change the Docker skip marker, update the `#skip-docker` check in the release workflow. |
60 | 62 | - To start release numbering from a different baseline when there are no tags yet, update `INITIAL_VERSION` in the release workflow. |
61 | 63 |
|
62 | 64 | ## Troubleshooting |
|
0 commit comments