mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-08-29 12:17:00 +00:00
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
# ATCR Release Pipeline for Tangled.org
|
|
# Triggers on version tags and builds cross-platform binaries using GoReleaser
|
|
|
|
when:
|
|
- event: ["manual"]
|
|
# TODO: Trigger only on version tags (v1.0.0, v2.1.3, etc.)
|
|
branch: ["main"]
|
|
|
|
engine: "nixery"
|
|
|
|
dependencies:
|
|
nixpkgs:
|
|
- git
|
|
- go
|
|
#- goreleaser
|
|
- podman
|
|
|
|
steps:
|
|
- name: Fetch git tags
|
|
command: git fetch --tags --force
|
|
|
|
- name: Checkout tag for current commit
|
|
command: |
|
|
CURRENT_COMMIT=$(git rev-parse HEAD)
|
|
export TAG=$(git tag --points-at $CURRENT_COMMIT --sort=-version:refname | head -n1)
|
|
if [ -z "$TAG" ]; then
|
|
echo "Error: No tag found for commit $CURRENT_COMMIT"
|
|
exit 1
|
|
fi
|
|
echo "Found tag $TAG for commit $CURRENT_COMMIT"
|
|
git checkout $TAG
|
|
|
|
- name: Build AppView Docker image
|
|
command: |
|
|
TAG=$(git describe --tags --exact-match 2>/dev/null || git tag --points-at HEAD | head -n1)
|
|
podman login atcr.io -u evan.jarrett.net -p ${APP_PASSWORD}
|
|
podman build -f Dockerfile.appview -t atcr.io/evan.jarrett.net/atcr-appview:${TAG} .
|
|
podman push atcr.io/evan.jarrett.net/atcr-appview:${TAG}
|
|
|
|
- name: Build Hold Docker image
|
|
command: |
|
|
TAG=$(git describe --tags --exact-match 2>/dev/null || git tag --points-at HEAD | head -n1)
|
|
podman login atcr.io -u evan.jarrett.net -p ${APP_PASSWORD}
|
|
podman build -f Dockerfile.hold -t atcr.io/evan.jarrett.net/atcr-hold:${TAG} .
|
|
podman push atcr.io/evan.jarrett.net/atcr-hold:${TAG}
|
|
|
|
# disable for now
|
|
# - name: Tidy Go modules
|
|
# command: go mod tidy
|
|
|
|
# - name: Install Goat
|
|
# command: go install github.com/bluesky-social/goat@latest
|
|
|
|
# - name: Run GoReleaser
|
|
# command: goreleaser release --clean
|