dorshinar / get-deployment-url Goto Github PK
View Code? Open in Web Editor NEWA GitHub actions that allows you to query your latest deployment and run tests against it.
License: MIT License
A GitHub actions that allows you to query your latest deployment and run tests against it.
License: MIT License
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
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 :)
Hi, I just followed the description and I am getting an environment is null error. Please help.
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"
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?
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.
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?
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 }}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.