Skip to content

Docker Image

Docker Image #3

Workflow file for this run

name: Docker Image
on:
push:
paths:
- 'Dockerfile'
- 'restart.sh'
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker login
env:
CR_PAT: ${{ secrets.CP_PAT }}
run: echo $CR_PAT | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository_owner }}/cronrestarter:latest
- name: Docker push
run: docker push ghcr.io/${{ github.repository_owner }}/cronrestarter:latest