Skip to content

Update CI: use docker image. #5

Update CI: use docker image.

Update CI: use docker image. #5

Workflow file for this run

---
name: Docker build
on: push
jobs:
build:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
GIT_COMMIT: "c7a9c25"
TAG: 1.1.0
NAME: piqmie
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Log into registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image name
run: |
echo "IMG_TAG=${REGISTRY}/${GITHUB_REPOSITORY_OWNER,,}/${NAME}:${TAG}" >> ${GITHUB_ENV}
- name: Build Docker image
run: |
docker build --build-arg GIT_COMMIT=$GIT_COMMIT -t $IMG_TAG .
docker images
- name: Push Docker image to registry
run: docker push $IMG_TAG