diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..7cc1ab4989 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,26 @@ +name: Release +on: + push: + tags: + - "*-d2iq.*" + +# Because variables are not exported, they are not visible by child processes, e.g. make +env: + registry: ghcr.io/mesosphere + +jobs: + release: + name: Release + runs-on: + - ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Login to container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.registry }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push container image + run: | + make push-images \ No newline at end of file diff --git a/hack/match-release-tag.sh b/hack/match-release-tag.sh index 96a6688611..97da404ec3 100755 --- a/hack/match-release-tag.sh +++ b/hack/match-release-tag.sh @@ -59,8 +59,9 @@ shift $((OPTIND-1)) # * v1.0.0-beta.0 # * v1.0.0-rc.0 # * v1.0.0 +# * v1.0.0-d2iq.0 # Any occurence of a digit in the above examples may be multiple digits. -REGEX='^[[:space:]]{0,}v[[:digit:]]{1,}\.[[:digit:]]{1,}\.[[:digit:]]{1,}(-(alpha|beta|rc)\.[[:digit:]]{1,}){0,1}[[:space:]]{0,}$' +REGEX='^[[:space:]]{0,}v[[:digit:]]{1,}\.[[:digit:]]{1,}\.[[:digit:]]{1,}(-(alpha|beta|rc|d2iq)\.[[:digit:]]{1,}){0,1}[[:space:]]{0,}$' # Match the tag against the regular expression for a release tag. match() { diff --git a/hack/release.sh b/hack/release.sh index 4a57241c53..c278d57dd2 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -26,7 +26,7 @@ set -x DO_WINDOWS_BUILD=${DO_WINDOWS_BUILD_ENV:-true} # BASE_REPO is the root path of the image repository -readonly BASE_IMAGE_REPO=gcr.io/cloud-provider-vsphere +readonly BASE_IMAGE_REPO=ghcr.io/mesosphere/cloud-provider-vsphere # Release images readonly CSI_IMAGE_RELEASE=${BASE_IMAGE_REPO}/csi/release/driver @@ -47,7 +47,7 @@ SYNCER_IMAGE_NAME= if [[ "$(git rev-parse --abbrev-ref HEAD)" =~ "master" ]]; then VERSION="$(git log -1 --format=%h)" else - VERSION="$(git describe --always 2>/dev/null)" + VERSION="$(git describe --tags --always 2>/dev/null)" fi GIT_COMMIT="$(git log -1 --format=%H)" GCR_KEY_FILE="${GCR_KEY_FILE:-}"