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

Dynamic version variable #88

Merged
merged 1 commit into from
Dec 21, 2023
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
4 changes: 4 additions & 0 deletions .github/workflows/docker-image-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_HUB_TOKEN }}
- name: Hash commit ID
run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV
- name: Replace version variable
run: sed -i 's/{{RELEASE_TAG}}/beta-${{ env.GITHUB_SHA_SHORT }}/g' files/config.go # Replace release variable with the name of this release
- name: Build and push
uses: docker/build-push-action@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_HUB_TOKEN }}
- name: Replace version variable
run: sed -i 's/{{RELEASE_TAG}}/${{github.event.release.tag_name}}/g' files/config.go # Replace release variable with the name of this release
- name: Build and push
uses: docker/build-push-action@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release GO binaries

on:
release:
types: [edited,created,published]
types: [edited,published]

jobs:
releases-matrix:
Expand Down Expand Up @@ -30,3 +30,4 @@ jobs:
retry: 10
overwrite: true
release_name: ${{ github.ref_name }}
pre_command: sed -i 's/{{RELEASE_TAG}}/${{github.event.release.tag_name}}/g' files/config.go # Replace release variable with the name of this release
2 changes: 1 addition & 1 deletion files/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/google/uuid"
)

const wrapperr_version_parameter = "v3.2.3"
const wrapperr_version_parameter = "{{RELEASE_TAG}}"
const minSecretKeySize = 32

var config_path, _ = filepath.Abs("./config/config.json")
Expand Down