Are You Awake Yet Action
@dataeducator ci sta già lavorando.
Dal 8/11/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Part of the OSS Architecture track
Task
- Within the workflows directory, add and configure the are you awake yet action for this project from this work in progress PR https://github.com/ProgramEquity/amplify/pull/447
- Add inline comments
Suggestions: try this prompt with Copilot "how to create a spellcheck GitHub Action like this one https://github.com/marketplace/actions/are-they-awake-yet"
Or you can debug the following output:
To create a GitHub Action in your ProgramEquity/amplify repository like the "Are They Awake Yet?" action, you can follow these steps:
-
Create a new GitHub repository for your action.
-
Create a new file in your repository called Dockerfile with the following contents:
RUN apk add --no-cache curl
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
This Dockerfile sets up a Node.js environment and installs the curl package. It also copies the entrypoint.sh script to the container and sets it as the entrypoint.
- Create a new file in your repository called entrypoint.sh with the following contents:
#!/bin/sh -l
curl -s https://awake-api.herokuapp.com/awake/$1 | grep -q "true"
if [ $? -eq 0 ]; then
echo "$1 is awake!"
exit 0
else
echo "$1 is asleep :("
exit 1
fi
This shell script is the entrypoint for the Docker container. It uses the curl command to make a request to the "Are They Awake Yet?" API with the specified URL. It then uses grep to check if the response contains the string "true". If the URL is awake, it prints a success message and exits with code 0. If the URL is asleep, it prints a failure message and exits with code 1.
Create a new file in your repository called action.yml with the following contents:
name: Are They Awake Yet?
description: Check if a website is awake
inputs:
url:
description: 'The URL to check'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
This YAML file defines the GitHub Action. It specifies the name and description of the action, as well as an input for the URL to check. It also specifies that the action should run using Docker, and sets the Docker image to the Dockerfile we created earlier.
Commit and push your changes to the repository.
Use the actions/checkout action to check out the repository in your workflow.
Use the ProgramEquity/amplifyaction to run the "Are They Awake Yet?" action in your workflow, passing the URL to check as an input.
Resources:
- What is an Action
- Our current workflows
- Getting started with GitHub Actions
- How to use Copilot to write your action recording
- If you're done with your task and want to suggest one of your own, check out marketplace
- Lingua principale
- JavaScript
- Stelle
- 120
- Fork
- 101
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenSourceFellows/amplify
-
QA Bug Part 2 Update Axios-cache-InterceptionForse di nuovo libera @SAUMILDHANKAR l’ha presa 355 giorni fa e non c’è nessuna pull request aperta. Apertabug Failing workflow check
OpenSourceFellows/amplify#1077 · 4 commenti · 2 assegnatari ·
-
Auto messages for Pull RequestForse di nuovo libera @Alex-is-Gonzalez l’ha presa 355 giorni fa e non c’è nessuna pull request aperta. Aperta
OpenSourceFellows/amplify#1076 · 2 commenti · 1 assegnatario ·
-
Add Auto Reviewer to PRAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
OpenSourceFellows/amplify#1075 ·
-
new contributor
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
OpenSourceFellows/amplify#1059 · 1 commento ·
-
Pick your own ActionAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
OpenSourceFellows/amplify#1058 · 1 commento ·
Tutte le issue di OpenSourceFellows/amplify
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
openlibhums/janeway#5604 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Generic OSC does not initialize OSC client on startup when "Listen for Feedback" is disabledAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
area/statement-execution TS conversion
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
scylladb/nodejs-rs-driver#584 ·
I maintainer di solito rispondono entro 2 giorni
-
新讀者走讀回報,照著一篇文章實際操作Apertadocumentation good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 3 giorni