update helm chart secret ref style #164
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_call: | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| go-test: | |
| name: Go Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Running Unit Tests | |
| run: go test -v $(go list ./... | grep -v internal/wasm) | |
| build-test: | |
| name: Build Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download llvm-mingw latest version | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ASSET_NAME=$(gh release view --repo mstorsjo/llvm-mingw --json assets -q '.assets[].name | select(test("ucrt-ubuntu.*x86_64\\.tar\\.xz$"))') | |
| gh release download --repo mstorsjo/llvm-mingw --pattern "$ASSET_NAME" --dir "$RUNNER_TEMP" | |
| mkdir -p "$RUNNER_TEMP/llvm-mingw" | |
| tar -xf "$RUNNER_TEMP/$ASSET_NAME" --strip-components=1 -C "$RUNNER_TEMP/llvm-mingw" | |
| - name: Testing Xipher Builds | |
| run: | | |
| docker run --rm \ | |
| -w /workspace \ | |
| -v $PWD:/workspace \ | |
| -v $RUNNER_TEMP/llvm-mingw:/llvm-mingw \ | |
| ghcr.io/goreleaser/goreleaser-cross:latest \ | |
| build --clean --snapshot | |
| action-test: | |
| name: Action Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, windows-latest, ubuntu-latest] | |
| version: [1.7.0, 1.13.0, latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Xipher | |
| uses: ./ | |
| with: | |
| version: ${{ matrix.version }} | |
| - name: Capture Xipher Version Installed | |
| run: | | |
| VERSION_INSTALLED=$(xipher --version | grep -m1 "Version" | awk '{print $NF}') | |
| if [[ ! "${VERSION_INSTALLED}" =~ ^v ]]; then | |
| VERSION_INSTALLED="v${VERSION_INSTALLED}" | |
| fi | |
| echo "XIPHER_VERSION_INSTALLED=${VERSION_INSTALLED}" >> $GITHUB_ENV | |
| - name: Resolve Expected Version | |
| run: | | |
| if [ "${{ matrix.version }}" = "latest" ]; then | |
| EXPECTED=$(gh release view --repo ${{ github.repository }} --json tagName -q '.tagName') | |
| else | |
| EXPECTED="${{ matrix.version }}" | |
| fi | |
| if [[ ! "${EXPECTED}" =~ ^v ]]; then | |
| EXPECTED="v${EXPECTED}" | |
| fi | |
| echo "XIPHER_VERSION_EXPECTED=${EXPECTED}" >> $GITHUB_ENV | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Verify Xipher Version | |
| shell: python | |
| run: | | |
| import sys, os | |
| version_expected = os.environ["XIPHER_VERSION_EXPECTED"] | |
| version_installed = os.environ["XIPHER_VERSION_INSTALLED"] | |
| sys.exit( | |
| int(version_expected != version_installed) | |
| ) |