Skip to content

Docker Image CI

Docker Image CI #41

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: downcase REPO
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
echo ${REPO}
echo ${GITHUB_REPOSITORY}
- name: Build and Push
env:
REGISTRY: ghcr.io
run: |
TAG=${GITHUB_REF#refs/tags/}
docker build -t $REGISTRY/${REPO}:${TAG} -t $REGISTRY/${REPO}:$(date +%s) .
docker push $REGISTRY/${REPO} --all-tags