Skip to content

Trigger workflow

Trigger workflow #14

Workflow file for this run

name: Build App Docker
on:
push:
paths:
- "Dockerfile"
- ".github/workflows/build-docker.yml"
pull_request:
paths:
- "Dockerfile"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Git
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
- name: Checkout code
run: |
git clone https://github.com/${{ github.repository }} .
git checkout ${{ github.sha }}
- name: Build docker image
run: |
cd ${{ github.workspace }}
echo "FROM ubuntu:latest" > Dockerfile
docker build -t ghcr.io/${{ github.repository }}/app-image:latest .
- name: Login to GH registry
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository }}/app-image:latest