This file contains 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
# Article: https://medium.com/rockedscience/docker-ci-cd-pipeline-with-github-actions-6d4cd1731030 | |
name: Lint the code, run tests, build and push Docker image | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '**' |
This file contains 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
# Article: https://medium.com/rockedscience/docker-ci-cd-pipeline-with-github-actions-6d4cd1731030 | |
name: Build and push Docker image upon release | |
on: | |
# Build and push Docker images *only* for releases. | |
release: | |
types: [published] # , created, edited | |
jobs: | |
push_to_registry: |
This file contains 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
# Extends: https://gist.github.com/rockedscience/1dc1a7b9d9ab7e8bce904d394d1ae1c7 | |
# ... | |
on: | |
# Event: commits are pushed to the repository | |
push: | |
branches: | |
- '*' # Select all branches *WITHOUT* a "/" in the name |
This file contains 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
# Article: https://medium.com/rockedscience/docker-ci-cd-pipeline-with-github-actions-6d4cd1731030 | |
name: Run unit tests with Python | |
# Sets the events which will trigger the Action | |
# `push` = any "push" action to the GitHub "remote", | |
# changes to any branch will be considered | |
on: [push] | |
jobs: | |
# `build` is a user-defined name for this job |
This file contains 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
import socket | |
import logging | |
import datetime | |
from BaseHTTPServer import BaseHTTPRequestHandler | |
from StringIO import StringIO | |
class HTTPRequest(BaseHTTPRequestHandler): | |
def __init__(self, request_text): | |
self.rfile = StringIO(request_text) |