Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate admintools tag #203

Merged
merged 9 commits into from
May 22, 2024
Merged
Changes from 5 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
35 changes: 29 additions & 6 deletions .github/workflows/release-admin-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
commit:
description: "Repo Commit sha"
required: true
admintools_tag:
description: "The tag for the new admintools image"
required: true
patch:
description: "The optional patch version of the admintools image"
required: false
latest:
type: boolean
description: "Also update latest tag"
Expand All @@ -21,21 +21,44 @@ on:
description: "Also update major tag"
required: true
default: false
dry-run:
description: "Whether or not this is a dry run"
type: boolean
required: false
default: true

jobs:
retag-and-release:
release-admin-tools:
name: "Re-tag and release images"
runs-on: ubuntu-latest

steps:
# Main
- uses: actions/checkout@v4
# For the action itself
- uses: actions/checkout@v4
with:
path: target
submodules: "true"
ref: ${{ github.event.inputs.commit }}
- uses: actions/setup-go@v5
with:
go-version-file: "**/go.mod"
go-version-file: "src/go.mod"
- name: Calculate admintools tag
run: |
today=$(date "+%Y.%-m.%-d" | tr -d '\n')
tdeebswihart marked this conversation as resolved.
Show resolved Hide resolved
patch=
if [ -n "${{inputs.patch}}" ]; then
patch="-p${{inputs.patch}}"
fi
temporal_ver=$(cd target/temporal && git describe --tags | cut -d '-' -f-2)
cli_ver=$(cd target/cli && git describe --tags | cut -d '-' -f-2)
tctl_ver=$(cd target/tctl && git describe --tags | cut -d '-' -f-2)
echo "TAG=${today}${patch}+server-${temporal_ver}.cli-${cli_ver}.tctl-${tctl_ver}" >> "${GITHUB_ENV}"
- name: Copy images
env:
COMMIT: ${{ github.event.inputs.commit }}
TAG: ${{ github.event.inputs.admintools_tag }}
TAG: ${{ env.TAG }}
USERNAME: ${{ secrets.DOCKER_USERNAME }}
PASSWORD: ${{ secrets.DOCKER_PAT }}
IMAGES: admintools
Expand Down
Loading