diff --git a/.github/workflows/deploy-matthew.yaml b/.github/workflows/deploy-matthew.yaml deleted file mode 100644 index 04047df..0000000 --- a/.github/workflows/deploy-matthew.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Test Action - -on: [push] - -jobs: - test-action: - name: GitHub Actions Test - runs-on: ubuntu-latest - steps: - - name: Checkout - id: checkout - uses: actions/checkout@v4 - - - name: Test Nimbus Action - id: test-action-matthew - uses: ./ - with: - api-key: ${{ secrets.NIMBUS_API_KEY }} - nimbus-server: ${{ secrets.NIMBUS_HOST_MATTHEW }} - nimbus-path: nimbus.yaml diff --git a/entrypoint.sh b/entrypoint.sh index 5e398bd..cdca767 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,18 +4,14 @@ set -euo pipefail REF="${GITHUB_REF}" if [[ "$REF" == refs/heads/* ]]; then - RAW_NAME="${REF#refs/heads/}" + BRANCH_NAME="${REF#refs/heads/}" elif [[ "$REF" == refs/tags/* ]]; then - RAW_NAME="${REF#refs/tags/}" + BRANCH_NAME="${REF#refs/tags/}" else echo "::error ::Unsupported GITHUB_REF format: $REF" exit 1 fi -BRANCH_NAME=$(echo "$RAW_NAME" | tr '[:upper:]' '[:lower:]' | \ - sed -e 's/[\/_ ]/-/g' \ - -e 's/[#!@.]//g') - # Make the request and capture both the body and status code HTTP_RESPONSE=$(curl --silent --location "${NIMBUS_SERVER}/deploy" --write-out "HTTPSTATUS:%{http_code}" \ --header "X-Api-Key: ${NIMBUS_API_KEY}" \