2022-01-29 23:48:52 +01:00
|
|
|
name: build
|
2022-01-29 22:31:27 +01:00
|
|
|
|
|
|
|
on:
|
2022-07-05 00:09:47 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-08-01 01:30:23 +02:00
|
|
|
paths:
|
|
|
|
- src/**
|
|
|
|
- config/**
|
|
|
|
- Dockerfile
|
|
|
|
- docker-compose.yml
|
|
|
|
- .github/workflows/build.yml
|
2022-01-29 22:31:27 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-08-01 01:30:23 +02:00
|
|
|
paths:
|
|
|
|
- src/**
|
|
|
|
- config/**
|
|
|
|
- Dockerfile
|
|
|
|
- docker-compose.yml
|
|
|
|
- .github/workflows/build.yml
|
2022-01-29 22:31:27 +01:00
|
|
|
|
|
|
|
jobs:
|
2022-01-29 23:48:52 +01:00
|
|
|
build:
|
2022-01-29 22:31:27 +01:00
|
|
|
name: Build Docker Image, Push to Container Registry
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.PAT }}
|
|
|
|
|
|
|
|
- name: Build and Push Docker Image
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
2022-07-04 20:01:59 +02:00
|
|
|
file: Dockerfile
|
2022-01-29 22:31:27 +01:00
|
|
|
push: true
|
|
|
|
tags: ghcr.io/${{ github.repository }}:latest
|
2022-01-30 00:04:28 +01:00
|
|
|
build-args: |
|
|
|
|
PORT=8000
|