feat: add new workflows

(cherry picked from commit d9b974de4697fbb20a151fe96b24e98fda269669)
This commit is contained in:
Alexandre Teles 2022-09-30 17:35:45 -03:00
parent 846b7bf104
commit 3ab50bb005
No known key found for this signature in database
GPG Key ID: 260D825F04C0527E
3 changed files with 67 additions and 3 deletions

65
.github/workflows/build_features.yml vendored Normal file
View File

@ -0,0 +1,65 @@
name: Test build a feature branch
on:
workflow_dispatch:
inputs:
branch:
description: 'The branch to test build'
required: true
default: ''
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAG: ${{ github.sha }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Dockerfile
id: checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- name: Setup QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=${{ startsWith(github.ref, 'refs/heads/main') }}
suffix=-${{ github.sha }}
- name: Build Docker image
id: build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Upload image
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: ${{ steps.meta.outputs.tags }}
retention_days: "1"

View File

@ -1,10 +1,8 @@
name: Main build
name: Build and Publish Docker Image
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '24 9 * * 6'
workflow_dispatch:

1
hypercorn.toml Normal file
View File

@ -0,0 +1 @@
bind