Skip to content

Add formatting query argument to list API #456

Add formatting query argument to list API

Add formatting query argument to list API #456

Workflow file for this run

name: Docker
on:
push:
branches: [ main ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main ]
env:
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: $( echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]' )
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: |
docker build . -t ${{ env.IMAGE_NAME }}:${GITHUB_REF##*/} --build-arg VERSION=${GITHUB_REF##*/} --build-arg GIT_SHA=${GITHUB_SHA}
# Only tag 'release' if REF startsWith 'v'
[[ ${GITHUB_REF##*/} = v* ]] && docker tag ${{ env.IMAGE_NAME }}:${GITHUB_REF##*/} ${{ env.IMAGE_NAME }}:release || echo "Not a release tag"
- name: Push image
if: github.event_name != 'pull_request'
run: |
docker push ${{ env.IMAGE_NAME }}:${GITHUB_REF##*/}
# Only push 'release' if REF startsWith 'v'
[[ ${GITHUB_REF##*/} = v* ]] && docker push ${{ env.IMAGE_NAME }}:release || echo "Not a release tag"
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- name: Deploy lb_bean_bot
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_KEY_PRIV }}
# Key creation:
# ssh-keygen -t ed25519 -C gh_docker_deploy_beancount_bot
# In authorized_keys:
# command="/home/admin/docker-compose-recipes/_s2/beancount-tg/update.sh prod" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxWEI6q0z1rb9xHGlHs6Bj1kFyRQXuhi+XdAfj0zRgA gh_docker_deploy_beancount_bot