Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 3 additions & 41 deletions .github/actions/shared-steps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,53 +72,15 @@ runs:
id: run
if: ${{ env.res != 0 || github.event_name == 'workflow_dispatch' }}
shell: bash
run: |
sudo podman run --rm -ti ${{ env.IMAGE_NAME }} bootc --version

INFO=$(sudo podman run --rm ${{ env.IMAGE_NAME }} cat /etc/os-release)
echo "$INFO"

echo "id=$(echo "$INFO" | grep "^ID=" | cut -d'=' -f2 | tr -d '"')" >> $GITHUB_OUTPUT
echo "version-id=$(echo "$INFO" | grep "^VERSION_ID=" | cut -d'=' -f2 | tr -d '"')" >> $GITHUB_OUTPUT
echo "vendor=$(echo "$INFO" | grep "^VENDOR_NAME=" | cut -d'=' -f2 | tr -d '"')" >> $GITHUB_OUTPUT

- name: Image Metadata
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5
id: metadata
with:
images: ${{ env.IMAGE_NAME }}
labels: |
redhat.id=${{ steps.run.outputs.id }}
redhat.version-id=${{ steps.run.outputs.version-id }}
version=${{ steps.run.outputs.version-id }}
release=${{ steps.run.outputs.version-id }}
build-date=${{ steps.build.outputs.build-time }}
org.opencontainers.image.created=${{ steps.build.outputs.build-time }}
org.opencontainers.image.vendor=${{ steps.run.outputs.vendor }}
org.opencontainers.image.version=${{ steps.run.outputs.version-id }}.${{ inputs.DATE_STAMP }}.0
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
annotations: |
redhat.id=${{ steps.run.outputs.id }}
redhat.version-id=${{ steps.run.outputs.version-id }}
version=${{ steps.run.outputs.version-id }}
release=${{ steps.run.outputs.version-id }}
build-date=${{ steps.build.outputs.build-time }}
org.opencontainers.image.created=${{ steps.build.outputs.build-time }}
org.opencontainers.image.vendor=${{ steps.run.outputs.vendor }}
org.opencontainers.image.version=${{ steps.run.outputs.version-id }}.${{ inputs.DATE_STAMP }}.0
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
run: sudo podman run --rm -ti ${{ env.IMAGE_NAME }} bootc container lint

- name: Log in to registry
if: ${{ env.res != 0 || github.event_name == 'workflow_dispatch' }}
if: ${{ (env.res != 0 || github.event_name == 'workflow_dispatch') && github.event_name != 'pull_request' }}
shell: bash
run: sudo podman login ${{ inputs.IMAGE_REGISTRY }} -u ${{ inputs.REGISTRY_USER }} -p ${{ inputs.REGISTRY_PASSWORD }}

- name: Push to registry
if: ${{ env.res != 0 || github.event_name == 'workflow_dispatch' }}
if: ${{ (env.res != 0 || github.event_name == 'workflow_dispatch') && github.event_name != 'pull_request' }}
shell: bash
run: |
# Tag: VERSION_MAJOR.VERSION_MINOR-DATE_STAMP-ARCH
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ jobs:
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Create and push manifest (docker)
if: github.event_name != 'pull_request'
run: |
# Manifest for both amd64 and arm64
IMAGE_DEST=${{ secrets.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}
Expand Down