Add workflow

This commit is contained in:
AngrySoundTech
2022-01-26 22:39:47 -05:00
parent b15676a1cd
commit 2cc44df8e2

54
containers/.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Build
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Waterfall Docker image
uses: docker/build-push-action@v2
with:
context: waterfall
tags: ${{ env.REGISTRY }}/${{ IMAGE_NAME }}/waterfall:latest
# build on feature branches, push only on main branch
push: ${{ github.ref == 'refs/heads/main' }}
- name: Build and push Paper Docker image
uses: docker/build-push-action@v2
with:
context: paper
tags: ${{ env.REGISTRY }}/${{ IMAGE_NAME }}/paper:latest
# build on feature branches, push only on main branch
push: ${{ github.ref == 'refs/heads/main' }}