ci: add ruff and fix remarks #1
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: Build & push the validation image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- src/** | |
- Containerfile | |
jobs: | |
build-and-push: | |
# To not run in forks | |
if: github.repository_owner == 'packit' | |
name: Build and push image | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- image: import-images | |
- image: packit-service-validation | |
env: | |
path: cron-jobs/${{ matrix.image }}/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add short SHA to the list of tags | |
shell: bash | |
run: | | |
echo "tags=latest ${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
id: calculate-tags | |
- name: Build Image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
containerfiles: Containerfile | |
image: packit-service-validation | |
oci: true | |
tags: ${{ steps.calculate-tags.outputs.tags }} | |
- name: Push To Quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: quay.io/packit | |
username: ${{ secrets.QUAY_IMAGE_BUILDER_USERNAME }} | |
password: ${{ secrets.QUAY_IMAGE_BUILDER_TOKEN }} |