Merge pull request #7 from release-engineering/update-dependencies #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: ResultsDB_Frontend | |
"on": | |
pull_request: | |
push: | |
workflow_dispatch: | |
inputs: {} | |
jobs: | |
hadolint: | |
name: Hadolint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dockerfile: | |
- Dockerfile | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hadolint/[email protected] | |
with: | |
dockerfile: ${{ matrix.dockerfile }} | |
failure-threshold: warning | |
image-build: | |
name: Container Image Build | |
needs: hadolint | |
runs-on: ubuntu-latest | |
env: | |
IMAGE_NAME: resultsdb_frontend | |
REGISTRY: quay.io/factory2 | |
GH_REGISTRY: ghcr.io/${{ github.actor }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ${{ env.IMAGE_NAME }} | |
tags: >- | |
${{ github.ref == 'refs/heads/develop' && 'latest' || '' }} | |
${{ github.sha }} | |
containerfiles: Dockerfile | |
build-args: | | |
GITHUB_SHA=${{ github.sha }} | |
- name: Log in to the image registry | |
if: github.event_name == 'push' && github.actor != 'dependabot[bot]' | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: ${{ secrets.REGISTRY_USER && env.REGISTRY || env.GH_REGISTRY }} | |
username: ${{ secrets.REGISTRY_USER || github.actor }} | |
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }} | |
- name: Push Image | |
if: github.event_name == 'push' && github.actor != 'dependabot[bot]' | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: ${{ secrets.REGISTRY_USER && env.REGISTRY || env.GH_REGISTRY }} |