Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
needs: verify
outputs:
version: ${{ steps.v.outputs.version }}
image_tag: ${{ steps.v.outputs.image_tag }}
is_release: ${{ steps.v.outputs.is_release }}
commit: ${{ steps.v.outputs.commit }}
build_date: ${{ steps.v.outputs.build_date }}
Expand All @@ -60,10 +61,15 @@ jobs:
- id: v
run: |
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
tag="${GITHUB_REF#refs/tags/}"
echo "version=${tag}" >> "$GITHUB_OUTPUT"
# docker/metadata-action strips the leading "v" from semver tags,
# so image tags are 1.2.3 while the git tag is v1.2.3.
echo "image_tag=${tag#v}" >> "$GITHUB_OUTPUT"
echo "is_release=true" >> "$GITHUB_OUTPUT"
else
echo "version=dev" >> "$GITHUB_OUTPUT"
echo "image_tag=dev" >> "$GITHUB_OUTPUT"
echo "is_release=false" >> "$GITHUB_OUTPUT"
fi
echo "commit=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -251,8 +257,8 @@ jobs:
## Container images

```bash
docker pull ${{ env.SERVER_IMAGE }}:${{ needs.meta.outputs.version }}
docker pull ${{ env.CLI_IMAGE }}:${{ needs.meta.outputs.version }}
docker pull ${{ env.SERVER_IMAGE }}:${{ needs.meta.outputs.image_tag }}
docker pull ${{ env.CLI_IMAGE }}:${{ needs.meta.outputs.image_tag }}
```

Platforms: `linux/amd64`, `linux/arm64`.
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,15 @@ One `Dockerfile`, two final stages, both distroless + static (`CGO_ENABLED=0`),
```bash
# Run the gRPC server
docker run --rm -p 50051:50051 --env-file .env \
ghcr.io/igun997/deploy-everything:dev
ghcr.io/igun997/deploy-everything:0.0.1

# Run a CLI command
docker run --rm --env-file .env \
ghcr.io/igun997/deploy-everything-cli:dev projects list
ghcr.io/igun997/deploy-everything-cli:0.0.1 projects list

# Bleeding edge (current master)
docker run --rm --env-file .env \
ghcr.io/igun997/deploy-everything-cli:dev version
```

---
Expand All @@ -389,13 +393,13 @@ docker run --rm --env-file .env \
| Git event | Image tags |
|-----------|-----------|
| push/merge to `master` | `dev`, `dev-<short-sha>` |
| tag `v0.0.1` (any `0.x.y`) | `0.0.1`, `0.0`, `latest` |
| tag `v0.0.1` | `0.0.1`, `0.0`, `0`, `latest` |
| tag `v1.2.3` | `1.2.3`, `1.2`, `1`, `latest` |
| pre-release tag `v1.2.3-rc1` | `1.2.3-rc1` only (no `latest`, no `1.2`/`1`) |

So `:dev` always points at the current `master`, `:latest` always points at the newest stable release.

`0.x.y` tags intentionally get no major-only tag — `docker/metadata-action` skips `{{major}}` for `0.x` because semver treats it as initial development with no compatibility guarantee.
The leading `v` is stripped from image tags: git tag `v0.0.1` produces image tag `0.0.1`. The binaries still report the full `v0.0.1` from `version`.

### Cutting a release

Expand Down