Skip to content

build: bump quay.expires-after from 5d to 7d to allow more test time #517

build: bump quay.expires-after from 5d to 7d to allow more test time

build: bump quay.expires-after from 5d to 7d to allow more test time #517

Workflow file for this run

name: Build Container Image
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
env:
STABLE_TAG: ${{ github.event_name == 'push' && github.ref_name || format('pr-{0}', github.event.pull_request.number) }}
# We had a problem with GitHub setting quay expiration label also during
# merge to main, so we just set meaningless value as a workaround.
EXPIRATION_LABEL: ${{ github.event_name == 'push' && 'quipucords.source=github' || 'quay.expires-after=7d' }}
IMAGE_NAME: ${{ vars.IMAGE_NAME || 'quipucords/quipucords-ui' }}
REGISTRY: ${{ vars.REGISTRY || 'quay.io' }}
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetches all commits/tags
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.STABLE_TAG }} ${{ env.STABLE_TAG == 'main' && 'latest' || '' }}
containerfiles: |
./Containerfile
labels: |
${{ env.EXPIRATION_LABEL }}
quipucords.backend.git_sha=${{ github.sha }}
extra-args: |
--ulimit nofile=4096:4096
- name: Push To quay.io
# Forks that do not set secrets and override the variables may fail this step.
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.REGISTRY }}
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
continue-on-error: true