Skip to content

Add server Dockerfile. #1

Add server Dockerfile.

Add server Dockerfile. #1

Workflow file for this run

name: CI build of all containers
on:
push:
branches:
- main
tags:
- v*

Check failure on line 7 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yaml

Invalid workflow file

You have an error in your yaml syntax on line 7
pull_request:
jobs:
push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build hinfo image
run: |
docker build . \
-f Dockerfile.hinfo \
--tag consdb-hinfo \
--label "runnumber=${GITHUB_RUN_ID}"
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Push image
run: |
ID=ghcr.io/${{ github.repository_owner }}/consdb-hinfo
if [[ "${{ github.ref }}" == "refs/pull/"* ]]; then
VERSION=$(echo "${{ github.head_ref }}" | sed -e 's|.*/||')
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
VERSION=$(echo "${{ github.ref_name }}" | sed -e 's|^v||')
else
VERSION=latest
fi
docker tag consdb-hinfo $ID:$VERSION
docker push $ID:$VERSION