Skip to content

Build

Build #30

Workflow file for this run

name: Build
on:
workflow_run:
workflows: ["Test"]
types:
- completed
jobs:
docker-build-and-push:
permissions: write-all
# This if condition checks three things:
# 1. That the Test pipeline completed successfully.
# 2. That the current ref is either the main branch or a tag.
if: |
github.event.workflow_run.conclusion == 'success' &&
(startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/tags/'))
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Task
uses: arduino/setup-task@v1.0.3
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push App using Buildpacks
run: task build_tasks:build:pack:gh