Skip to content

Commit

Permalink
Fix unknown/unknown docker images
Browse files Browse the repository at this point in the history
See #752
  • Loading branch information
erikbosch committed Mar 19, 2024
1 parent cc2e0a6 commit d9769c6
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 23 deletions.
17 changes: 7 additions & 10 deletions .github/actions/copy-from-oci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ inputs:
description: |
This will be the name of the temporary container, making sure we do not leave any stale containers around
(we try deleting and before and after running this, so we can recover should a workflow for a given id fail before cleaning up)
Will be used for artifact name (if export=true) and to identify
Will be used for artifact name (if export=true) and to identify
This will also be created as directory in cwd.
!No special characters allowed "/" !
export:
Expand All @@ -35,29 +35,26 @@ inputs:
transform:
required: false
description: Optionally applying chosen --transform to tar when export is set to true


runs:
using: "composite"
steps:
- shell: bash
run: |
run: |
mkdir -p ${{ inputs.id }}
docker rm ${{ inputs.id }} || true
docker create --name ${{ inputs.id }} --platform ${{ inputs.platform }} ${{ inputs.image }}
docker cp ${{ inputs.id }}:${{ inputs.src }} ${{ inputs.id }}
docker cp ${{ inputs.id }}:${{ inputs.src }} ${{ inputs.id }}
docker rm ${{ inputs.id }}
- if: inputs.export == 'true'
shell: bash
run: tar -czf ${{ inputs.id }}.tar.gz -C ${{ inputs.id }} --transform "${{ inputs.transform }}" .

- if: inputs.export == 'true'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.id }}
path: ${{ inputs.id }}.tar.gz



16 changes: 11 additions & 5 deletions .github/workflows/kuksa_databroker-cli_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ jobs:
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
if: needs.check_ghcr_push.outputs.push == 'true'
Expand All @@ -111,6 +111,9 @@ jobs:
${{ steps.meta.outputs.tags }}
ttl.sh/kuksa.val/kuksa-databroker-cli-${{github.sha}}
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false

- name: Build ephemeral KUKSA Databroker container and push to ttl.sh
if: needs.check_ghcr_push.outputs.push == 'false'
Expand All @@ -126,6 +129,9 @@ jobs:
push: true
tags: "ttl.sh/kuksa.val/kuksa-databroker-cli-${{github.sha}}"
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false


- name: Posting message
Expand All @@ -134,19 +140,19 @@ jobs:
image: ttl.sh/kuksa.val/kuksa-databroker-cli-${{github.sha}}

- name: "Archiving AMD64 artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: databroker-cli-amd64
path: ${{github.workspace}}/dist/amd64

- name: "Archiving ARM64 artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: databroker-cli-arm64
path: ${{github.workspace}}/dist/arm64

- name: "Archiving RISCV64 artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: databroker--cli-riscv64
path: ${{github.workspace}}/dist/riscv64
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/kuksa_databroker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
--exclude-files kuksa_databroker/databroker/tests/world/*
- name: Upload coverage report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Code coverage report
path: cobertura.xml
Expand Down Expand Up @@ -119,11 +119,11 @@ jobs:
# only needed for runners without buildx setup, will be slow
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
if: needs.check_ghcr_push.outputs.push == 'true'
Expand All @@ -149,6 +149,9 @@ jobs:
${{ steps.meta.outputs.tags }}
ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}}
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false

- name: Build ephemeral KUKSA Databroker container and push to ttl.sh
if: needs.check_ghcr_push.outputs.push == 'false'
Expand All @@ -164,26 +167,29 @@ jobs:
push: true
tags: "ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}}"
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false

- name: Posting message
uses: ./.github/actions/post-container-location
with:
image: ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}}

- name: "Archiving AMD64 artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: databroker-amd64
path: ${{github.workspace}}/dist/amd64

- name: "Archiving ARM64 artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: databroker-arm64
path: ${{github.workspace}}/dist/arm64

- name: "Archiving RISCV64 artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: databroker-riscv64
path: ${{github.workspace}}/dist/riscv64
Expand All @@ -197,7 +203,7 @@ jobs:
steps:

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/kuksa_val_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ jobs:
${{ steps.meta.outputs.tags }}
ttl.sh/kuksa.val/kuksa-server-${{github.sha}}
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false

- name: Build ephemeral KUKSA Server docker and push to ttl.sh
if: needs.check_ghcr_push.outputs.push == 'false'
Expand All @@ -85,3 +88,6 @@ jobs:
push: true
tags: ttl.sh/kuksa.val/kuksa-server-${{github.sha}}
labels: ${{ steps.meta.outputs.labels }}
# Provenance to solve that an unknown/unkown image is shown on ghcr.io
# Same problem as described in https://github.com/orgs/community/discussions/45969
provenance: false
2 changes: 1 addition & 1 deletion .github/workflows/kuksa_val_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: listing test results
run: ls out
- name: Upload unittests artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: unittest
path: ${{github.workspace}}/out
Expand Down

0 comments on commit d9769c6

Please sign in to comment.