Files
Docker-Chevereto/.github/workflows/httpd-php.yml
2021-06-13 15:32:38 -04:00

56 lines
1.6 KiB
YAML

name: Build httpd-php
on:
workflow_dispatch:
inputs:
useCustomApp:
description: 'Use REPO_APP?'
required: false
default: '0'
jobs:
build:
name: Build and push image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Checkout custom application
env:
REPO_CUSTOM_APP: ${{ secrets.REPO_APP }}
USE_CUSTOM_APP: ${{ github.event.inputs.useCustomApp }}
if: env.REPO_CUSTOM_APP != null && env.USE_CUSTOM_APP > 0
uses: actions/checkout@v2
with:
repository: ${{ secrets.REPO_APP }}
token: ${{ secrets.REPO_APP_ACCESS_TOKEN }}
path: chevereto
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ secrets.REGISTRY_IMAGE }}
tags: latest-httpd-php
dockerfiles: |
./httpd-php.Dockerfile
build-args: |
CHEVERETO_LICENSE=${{ secrets.CHEVERETO_LICENSE }}
- name: Log in to container registry
uses: redhat-actions/podman-login@v1
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
registry: ${{ secrets.REGISTRY_LABEL }}
- name: Push to container registry
id: push-to-registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ secrets.REGISTRY_LABEL }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"