make branch build artifact executable

This commit is contained in:
Kenneth Bingham 2023-10-25 13:02:24 -04:00
parent 7bc923d67d
commit 502f3d3a69
No known key found for this signature in database
GPG Key ID: 31709281860130B6

View File

@ -27,32 +27,49 @@ jobs:
with:
node-version: 18.x
- run: npm install
- name: install ui node modules
shell: bash
run: npm install
working-directory: ui
- run: npm run build
- name: build node ui
shell: bash
run: npm run build
working-directory: ui
env:
CI: "true"
- name: go install
shell: bash
run: go install -ldflags "-X github.com/openziti/zrok/build.Version=${{ github.ref }} -X github.com/openziti/zrok/build.Hash=${{ github.sha }}" ./...
- name: test
- name: go test
shell: bash
run: go test -v ./...
- name: solve GOBIN
id: solve_go_bin
shell: bash
run: |
echo DEBUG: go_path="$(go env GOPATH)"
echo go_bin="$(go env GOPATH)/bin" >> $GITHUB_OUTPUT
- name: set build artifact filemodes to executable
shell: bash
run: |
ls -lAh ${{ steps.solve_go_bin.outputs.go_bin }}/
chmod -Rc +x ${{ steps.solve_go_bin.outputs.go_bin }}/
- name: tar build artifacts
run: tar -cvf /tmp/linux-amd64.tar -C ${{ steps.solve_go_bin.outputs.go_bin }}/ .
- name: upload build artifact
uses: actions/upload-artifact@v3
with:
name: linux-amd64
path: ${{ steps.solve_go_bin.outputs.go_bin }}/zrok
path: /tmp/linux-amd64.tar
if-no-files-found: error
# build a release candidate container image for branches named "main" or like "v*"
rc-container-build:
needs: ubuntu-build
@ -62,6 +79,7 @@ jobs:
steps:
- name: Set a container image tag from the branch name
id: slug
shell: bash
run: |
echo branch_tag=$(sed 's/[^a-z0-9_-]/__/gi' <<< "${GITHUB_REF#refs/heads/}") >> $GITHUB_OUTPUT
@ -94,11 +112,10 @@ jobs:
ZROK_CONTAINER_IMAGE_REPO: ${{ vars.ZROK_CONTAINER_IMAGE_REPO || 'openziti/zrok' }}
ZROK_CONTAINER_IMAGE_TAG: ${{ steps.slug.outputs.branch_tag }}
id: tagprep_cli
shell: bash
run: |
DOCKER_TAGS=""
DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG}"
echo "DEBUG: DOCKER_TAGS=${DOCKER_TAGS}"
echo DOCKER_TAGS="${DOCKER_TAGS}" >> $GITHUB_OUTPUT
echo DOCKER_TAGS="${ZROK_CONTAINER_IMAGE_REPO}:${ZROK_CONTAINER_IMAGE_TAG}" \
| tee -a $GITHUB_OUTPUT
- name: Build & Push Linux AMD64 CLI Container Image to Hub
uses: docker/build-push-action@v3