Skip to content

Commit

Permalink
Correcting for PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HuubDaems committed Oct 12, 2023
1 parent a37bef1 commit fc9228c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/fc-asciidoctor-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Check and verify version.json
id: check_version
run: |
echo -n ::set-output name=IMAGE_TAGS::
echo $(jq -r '.version' ${context}/version.json)

- name: Get image tags
id: image_tags
uses: redhat-cop/github-actions/get-image-version@master
with:
IMAGE_CONTEXT_DIR: ${{ env.CONTEXT_DIR }}

- name: Build image
uses: redhat-actions/buildah-build@v2
with:
Expand All @@ -26,6 +28,7 @@ jobs:
image: ${{ env.image_name }}
oci: true
tags: ${{ steps.check_version.outputs.IMAGE_TAGS }}

- name: Test image
run: |
echo "Running: podman run ${image_name}:${{ steps.check_version.outputs.IMAGE_TAGS }} git --version"
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/fc-asciidoctor-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,13 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master

- name: Get image tags
id: image_tags
run: |
echo -n ::set-output name=IMAGE_TAGS::
VERSION=$(jq -r '.version' ${context}/version.json)
TAGS=('latest')
if [ "${VERSION}" ] && [ "${VERSION}" != "latest" ]; then
TAGS+=("${VERSION}")
fi
if [[ "${GITHUB_REF}" =~ refs/tags/(.*) ]]; then
TAGS+=("git-${BASH_REMATCH[1]}")
fi
echo "${TAGS[*]}"
uses: redhat-cop/github-actions/get-image-version@master
with:
IMAGE_CONTEXT_DIR: ${{ env.CONTEXT_DIR }}

- name: Build image
id: build_image
uses: redhat-actions/buildah-build@v2
Expand All @@ -38,6 +32,7 @@ jobs:
./${{ env.context }}/Dockerfile
image: ${{ env.image_name }}
tags: "${{ steps.image_tags.outputs.IMAGE_TAGS }}"

- name: Push to Quay
id: push_to_quay
uses: redhat-actions/push-to-registry@v2
Expand Down

0 comments on commit fc9228c

Please sign in to comment.