Skip to content

style: drop black in favor of ruff format #129

style: drop black in favor of ruff format

style: drop black in favor of ruff format #129

Workflow file for this run

name: Build Container Image
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [main, 'release/*']
env:
STABLE_TAG: ${{ github.event_name == 'push' && github.ref_name || format('pr-{0}', github.event.pull_request.number) }}-arm64
# 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=5d' }}
IMAGE_NAME: ${{ vars.IMAGE_NAME || 'quipucords/quipucords' }}
REGISTRY: ${{ vars.REGISTRY || 'quay.io' }}
jobs:
# Warning! Please do not change the name "build-arm64", reconfigure it to
# use a matrix, or anything else that would change its name in GitHub runs.
# We specifically ignore this job name in discovery-ci "wait" tasks before
# test execution because this job is slow and we do not want our integration
# tests to wait for it to complete. If you believe you have a good reason
# for changing this job name, please consult the dev team first and update
# discovery-ci accordingly.
build-arm64:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # fetches all commits/tags
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build quipucords image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
archs: arm64
tags: ${{ env.STABLE_TAG }} ${{ env.STABLE_TAG == 'main-arm64' && 'latest-arm64' || '' }}
containerfiles: |
./Dockerfile
labels: |
${{ env.EXPIRATION_LABEL }}
quipucords.backend.git_sha=${{ github.sha }}
- 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