Skip to content

Merge pull request #17 from mareuter/fix1 #5

Merge pull request #17 from mareuter/fix1

Merge pull request #17 from mareuter/fix1 #5

Workflow file for this run

name: Container
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
branches:
- "main"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Build package with deps
run: |
python -m pip install --upgrade pip
pip wheel --wheel-dir wheel --editable .
ls
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
mareuter/lct-web
ghcr.io/mareuter/lct-web
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
render:
runs-on: ubuntu-latest
needs: docker
steps:
- name: Deploy to Render
uses: johnbeynon/[email protected]
with:
service-id: ${{ secrets.RENDER_SERVICE_ID }}
key: ${{ secrets.RENDER_SERVICE_KEY }}