GithubHelp home page GithubHelp logo

dorshinar / get-deployment-url Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 8.0 1.6 MB

A GitHub actions that allows you to query your latest deployment and run tests against it.

License: MIT License

JavaScript 100.00%

get-deployment-url's People

Contributors

dependabot[bot] avatar dorshinar avatar jeremylorino avatar paales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

get-deployment-url's Issues

`retryInterval` default and input not working, rate limit exceeded

retryInterval default setting is not working. I've tried manually setting the retry interval as well, but requests are fired without any interval between.

Here's my step:

- name: Get deployment URL
  id: deployment_url
  uses: dorshinar/[email protected]
  timeout-minutes: 5
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    retryInterval: 10000

In the logs, I can see that requests are not waiting for ten seconds. Also console.log appears that retryInterval is undefined. Eventually the rate limit is exceeded, log output:

environmentUrl is null, waiting  milliseconds and trying again
environmentUrl is null, waiting  milliseconds and trying again
##[error]API rate limit exceeded

Add vercel and nextjs descriptions to README

I guess the main purpose of this action is to get the deployment URL of a nextjs installation deployed on Vercel. Might be interesting to write some additional documentation for that. Might also be interesting to reference the blogpost you've written about it :)

set-output command will be deprecated soon

got this warning when running this action:

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

image

Getting environment is null error

Hi, I just followed the description and I am getting an environment is null error. Please help.
Capture11

This is my yml file:

name: Azure Static Web Apps CI/CD

on:
  push:
    branches:
      - dev
  pull_request:
    types: [opened, synchronize, reopened, closed]
    branches:
      - dev

jobs:
  build_and_deploy_job:
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
    runs-on: ubuntu-latest
    name: Build and Deploy Job
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

      - uses: actions/cache@v2
        id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
        with:
          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-
      - name: Build And Deploy
        id: builddeploy
        uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_RIVER_01F5A930F }}
          repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
          action: "upload"
          ###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
          # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
          app_location: "/" # App source code path
          api_location: "" # Api source code path - optional
          output_location: "build" # Built app content directory - optional
        env:
          VITE_AG_GRID_LICENSE_KEY: ${{secrets.VITE_AG_GRID_LICENSE_KEY}}
          VITE_API_SCOPE: ${{secrets.VITE_API_SCOPE}}
          VITE_CLIENT_ID: ${{secrets.VITE_CLIENT_ID}}
          VITE_SOURCE_LOADER_BASE_URL: ${{secrets.VITE_SOURCE_LOADER_BASE_URL_DEV}}
          VITE_TENANT_ID: ${{secrets.VITE_TENANT_ID}}
      - name: Get deployment URL
        id: deployment
        uses: dorshinar/get-deployment-url@master
        timeout-minutes: 5
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
      - run: echo ${{ steps.deployment.outputs.deployment }}

  close_pull_request_job:
    if: github.event_name == 'pull_request' && github.event.action == 'closed'
    runs-on: ubuntu-latest
    name: Close Pull Request Job
    steps:
      - name: Close Pull Request
        id: closepullrequest
        uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_RIVER_01F5A930F }}
          action: "close"

Error: github.GitHub is not a constructor

This action looks great and I really want to get it working, but when I run it, I just get this output (I've changed the repo details to ***** as it's a private repo):

Run dorshinar/[email protected]
  with:
    token: ***
    retryInterval: 10000
Starting to run with following input: {
  repo: '********',
  owner: '********',
  branch: '********'
}
Error: github.GitHub is not a constructor

Here is my complete .github/workflows/audit.yml:

name: Audit

on:
  pull_request:
    types: [opened, reopened]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:

    - name: Get deployment URL
      id: deployment
      uses: dorshinar/[email protected]
      timeout-minutes: 5
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

    - name: TODO - some kind of audit
      run: npm run audit-site
      env:
        deployment: ${{ steps.deployment.outputs.deployment }}

Any ideas what the problem might be?

##[error]Cannot read property '0' of null

I was working on something similar, and stumbled upon this repo by accident, what a happy accident!

Running into an issue though

Run dorshinar/[email protected]
##[error]Cannot read property '0' of null

If I rerun the action it will succeed and will return the proper URL.

3rd party app request.

I am trying to use this with a private repo under our company group.

I am getting

Cannot read property 'target' of null

I think because the gql query is coming back empty because it can't see the repo.

When I checked it with GitHub GraphQL API Explorer. That is the error I got.

I had to go to my account that I pass the token for, and under Applications -> Authorized OAuth Apps, "request" Organization access.

I am thinking they updated they way they do things, and not sure how to proceed.

What do you think?

github.GitHub is not a constructor

Run dorshinar/[email protected]
Starting to run with following input: {
  repo: 'robot***',
  owner: 'openfoodfacts',
  branch: 'deploy-grafana-annotation'
}
Error: github.GitHub is not a constructor

for:

    - name: Get deployment URL
      if: ${{ always() }}
      id: get-deployment
      uses: dorshinar/[email protected]
      timeout-minutes: 5
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.