This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3-slim AS builder | |
ADD . /app | |
WORKDIR /app | |
# We are installing a dependency here directly into our app source dir | |
RUN /usr/local/bin/python -m pip install --upgrade pip | |
RUN pip install --target=/app -r requirements.txt | |
# A distroless container image with Python and some basics like SSL certificates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""This module contains the code that executes the github action.""" | |
import os | |
def main(): | |
"""Greet user using the supplied name.""" | |
my_input = os.getenv('INPUT_MYINPUT') or 'world' | |
my_output = f"Hello {my_input}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push] | |
jobs: | |
hello_world_job: | |
runs-on: ubuntu-latest | |
name: A job to say hello | |
steps: | |
- name: Hello world action step | |
id: hello | |
uses: twyle/[email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# oryks-code-coverage | |
This action prints "Hello World" or "Hello" + the name of a person to greet to the log. | |
## Inputs | |
## `who-to-greet` | |
**Required** The name of the person to greet. Default `"World"`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -l | |
echo "Hello $1" | |
time=$(date) | |
echo "::set-output name=time::$time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# action.yml | |
name: 'Hello World' | |
description: 'Greet someone and record the time' | |
inputs: | |
who-to-greet: # id of input | |
description: 'Who to greet' | |
required: true | |
default: 'World' | |
outputs: | |
time: # id of output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Container image that runs your code | |
FROM alpine:3.10 | |
# Copies your code file from your action repository to the filesystem path `/` of the container | |
COPY entrypoint.sh /entrypoint.sh | |
# Code file to execute when the docker container starts up (`entrypoint.sh`) | |
ENTRYPOINT ["/entrypoint.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Commands used to start and test the application.""" | |
from flask.cli import FlaskGroup | |
from API import app | |
cli = FlaskGroup(app) | |
if __name__ == '__main__': | |
cli() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLIENT_ID=xxxxxxxxxxxxxxxxxxxxx | |
CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FLASK_APP=API/__init__.py | |
FLASK_ENV=development |