b3d02e3ba7
* ns-api: remove sqlite support ns-api: add env var to skip migrations for local dev ns-api: tidy up imports ns-api: fix deserialisation fo node descriptions update dockerfile update README fix up README and example env ns-api: bump major version to 4 ns-api: add more geoip data and new performance field in dvpn responses * ability to import partial ticketbooks * wip: adding common ecash state to NS API * buffering ticketbooks * wip * distribute tickets when getting testrun assignment * passing ticketbook data to gateway probe * wrapped around storage tx * ticketbook query fixes * clippy * modified testrun assignment to always return tickets * Update version * Update push-node-status-agent.yaml * Update Cargo.toml * add entrypoint for ns agents * sqlx prepare and cargo fmt * clippy fixes * Update ci-check-ns-api-version.yml --------- Co-authored-by: Mark Sinclair <mmsinclair@users.noreply.github.com> Co-authored-by: benedetta davico <46782255+benedettadavico@users.noreply.github.com> Co-authored-by: benedettadavico <benedetta.davico@gmail.com>
85 lines
3.2 KiB
YAML
85 lines
3.2 KiB
YAML
name: Build and upload Node Status agent container to harbor.nymte.ch
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
gateway_probe_git_ref:
|
|
type: string
|
|
default: nym-vpn-core-v1.4.0
|
|
required: true
|
|
description: Which gateway probe git ref to build the image with
|
|
release_image:
|
|
description: 'Tag image as a release'
|
|
required: true
|
|
default: false
|
|
type: boolean
|
|
|
|
env:
|
|
WORKING_DIRECTORY: "nym-node-status-api/nym-node-status-agent"
|
|
CONTAINER_NAME: "node-status-agent"
|
|
|
|
jobs:
|
|
build-container:
|
|
runs-on: arc-linux-latest-dind
|
|
steps:
|
|
- name: Login to Harbor
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: harbor.nymte.ch
|
|
username: ${{ secrets.HARBOR_ROBOT_USERNAME }}
|
|
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
|
|
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Configure git identity
|
|
run: |
|
|
git config --global user.email "lawrence@nymtech.net"
|
|
git config --global user.name "Lawrence Stalder"
|
|
|
|
- name: Get version from cargo.toml
|
|
id: get_version
|
|
run: |
|
|
VERSION=$(yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml)
|
|
echo "result=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: cleanup-gateway-probe-ref
|
|
id: cleanup_gateway_probe_ref
|
|
run: |
|
|
GATEWAY_PROBE_GIT_REF=${{ github.event.inputs.gateway_probe_git_ref }}
|
|
GIT_REF_SLUG="${GATEWAY_PROBE_GIT_REF//\//-}"
|
|
echo "git_ref=${GIT_REF_SLUG}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Set GIT_TAG variable
|
|
run: echo "GIT_TAG=${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}-${{ steps.cleanup_gateway_probe_ref.outputs.git_ref }}" >> $GITHUB_ENV
|
|
|
|
- name: Initialize RELEASE_TAG
|
|
run: echo "RELEASE_TAG=" >> $GITHUB_ENV
|
|
|
|
- name: Set RELEASE_TAG for release
|
|
if: github.event.inputs.release_image == 'true'
|
|
run: echo "RELEASE_TAG=golden-" >> $GITHUB_ENV
|
|
|
|
- name: Set IMAGE_NAME_AND_TAGS variable
|
|
run: echo "IMAGE_NAME_AND_TAGS=${{ env.CONTAINER_NAME }}:${{ env.RELEASE_TAG }}${{ steps.get_version.outputs.result }}-${{ steps.cleanup_gateway_probe_ref.outputs.git_ref }}" >> $GITHUB_ENV
|
|
|
|
- name: New env vars
|
|
run: echo "RELEASE_TAG='$RELEASE_TAG' GIT_TAG='$GIT_TAG' IMAGE_NAME_AND_TAGS='$IMAGE_NAME_AND_TAGS'"
|
|
|
|
# - name: Remove existing tag if exists
|
|
# run: |
|
|
# if git rev-parse $${{ env.GIT_TAG }} >/dev/null 2>&1; then
|
|
# git push --delete origin $${{ env.GIT_TAG }}
|
|
# git tag -d $${{ env.GIT_TAG }}
|
|
# fi
|
|
|
|
# - name: Create tag
|
|
# run: |
|
|
# git tag -a $${{ env.GIT_TAG }} -m "Version ${{ steps.get_version.outputs.result }}-${{ steps.cleanup_gateway_probe_ref.outputs.git_ref }}"
|
|
# git push origin $${{ env.GIT_TAG }}
|
|
|
|
- name: BuildAndPushImageOnHarbor
|
|
run: |
|
|
docker build --build-arg GIT_REF=${{ github.event.inputs.gateway_probe_git_ref }} -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.IMAGE_NAME_AND_TAGS }}
|
|
docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags
|