Skip to content

[WIP] push image to registry #2

[WIP] push image to registry

[WIP] push image to registry #2

name: Build and push
on:
pull_request:
permissions:
pull-requests: write
contents: write
jobs:
install-podman:
name: build-push-image
runs-on: ubuntu-latest
steps:
- name: Checkout Push to Registry action
uses: actions/checkout@v4
- name: Install latest podman
run: |
bash .github/workflows/scripts/install_latest_podman.sh
# Build image using Buildah action
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ secret.IMAGE_NAME }}

Check failure on line 27 in .github/workflows/build-push-image.yml

View workflow run for this annotation

GitHub Actions / Build and push

Invalid workflow file

The workflow is not valid. .github/workflows/build-push-image.yml (Line: 27, Col: 18): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.IMAGE_NAME
layers: false
tags: ${{ github.event.pull_request.number }}
dockerfiles: |
./Dockerfile
# Authenticate to container image registry to push the image
- name: Podman Login
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ secrets.TEMP_USER }}
password: ${{ secrets.TEMP_TOKEN }}
# Push the image to Image Registry)
- name: Push To Image registry
uses: ./
id: push
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ env.TEMP_NAMESPACE }}
extra-args: |
--disable-content-trust
- name: Echo outputs
run: |
echo "${{ toJSON(steps.push.outputs) }}"