generated from phundrak/rust-poem-openapi-template
34 lines
854 B
YAML
34 lines
854 B
YAML
|
name: Publish Docker image
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- 'main'
|
||
|
- 'develop'
|
||
|
tags:
|
||
|
- 'v*'
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- 'main'
|
||
|
|
||
|
jobs:
|
||
|
publish:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
- name: Log in to Docker registry
|
||
|
uses: docker/login-action@v3.3.0
|
||
|
with:
|
||
|
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||
|
- uses: cachix/install-nix-action@v27
|
||
|
with:
|
||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||
|
- name: Build Docker image
|
||
|
run: nix develop --command -- just docker-build
|
||
|
- name: Load Docker image
|
||
|
run: docker load < result
|
||
|
- name: Docker Metadata action
|
||
|
uses: docker/metadata-action@v5.5.1
|
||
|
with:
|
||
|
image: tal-backend:latest
|