From 595324ca9f9ef354b4eb7ba117d37075c2e5b010 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 19 Dec 2023 17:56:05 +0100 Subject: [PATCH] test --- .github/actions/meta/action.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/actions/meta/action.yml b/.github/actions/meta/action.yml index 090e4b464..ebfefaa84 100644 --- a/.github/actions/meta/action.yml +++ b/.github/actions/meta/action.yml @@ -20,19 +20,19 @@ outputs: # using fromJSON as below gave an error `error reading JToken from JsonReader` - hence using jq # value: ghcr.io/${{ github.repository }}/container:${{ fromJSON(steps.docker_action_meta.outputs.json).labels['org.opencontainers.image.version'] }} # https://github.com/splunk/splunk-add-on-for-microsoft-cloud-services/actions/runs/7019443167/job/19104471863#step:7:4 - value: ghcr.io/${{ github.repository }}/container:${{ steps.docker_meta_outputs.outputs.sc4s_version }} + value: ghcr.io/${{ github.repository }}/container:$(echo '${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.version"]') container_tags: value: ${{ steps.docker_action_meta.outputs.tags }} container_labels: value: ${{ steps.docker_action_meta.outputs.labels }} container_buildtime: - value: ${{ steps.docker_meta_outputs.outputs.container_buildtime }} + value: $(echo '${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.created"]') container_version: - value: ${{ steps.docker_meta_outputs.outputs.container_version }} + value: $(echo '${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.version"]') container_revision: - value: ${{ steps.docker_meta_outputs.outputs.container_revision }} + value: $(echo '${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.revision"]') container_base: - value: ${{ steps.docker_meta_outputs.outputs.container_base }} + value: $(echo '${{ steps.docker_action_meta.outputs.json }}' | jq -r '.tags[0]') matrix_supportedSplunk: value: ${{ steps.matrix.outputs.supportedSplunk }} matrix_latestSplunk: @@ -84,18 +84,6 @@ runs: type=ref,event=branch type=ref,event=pr - - name: Set Docker meta outputs - id: docker_meta_outputs - shell: bash - # echo 'sc4s_version=${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.version"]' >> "$GITHUB_OUTPUT" - run: | - outputs_json=${{ steps.docker_action_meta.outputs.json }} - echo 'sc4s_version=$outputs_json' | jq -r '.labels["org.opencontainers.image.version"]' >> "$GITHUB_OUTPUT" - echo 'container_buildtime=${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.created"]' >> "$GITHUB_OUTPUT" - echo 'container_version=${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.version"]' >> "$GITHUB_OUTPUT" - echo 'container_revision=${{ steps.docker_action_meta.outputs.json }}' | jq -r '.labels["org.opencontainers.image.revision"]' >> "$GITHUB_OUTPUT" - echo 'container_base=${{ steps.docker_action_meta.outputs.json }}' | jq -r '.tags[0]' >> "$GITHUB_OUTPUT" - - name: matrix id: matrix uses: splunk/addonfactory-test-matrix-action@v1.10