diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7cf9c1..5d6d442 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,4 +70,32 @@ jobs: - name: Run tests on the image with cinc-auditor run: | $(git rev-parse --show-toplevel)/bin/test.sh + + - name: Build and push + uses: docker/bake-action@v4 + with: + workdir: ${{ matrix.image }} + push: ${{ github.event_name != 'pull_request' }} + + - name: Get the image name + if: github.event_name != 'pull_request' + id: image_description + run: | + echo "image_name=$(docker buildx bake --print 2> /dev/null | jq -r '.target.release.labels."org.opencontainers.image.title"')" >> $GITHUB_ENV + + - name: Get the image description + if: github.event_name != 'pull_request' + id: image_description + run: | + echo "image_description=$(docker buildx bake --print 2> /dev/null | jq -r '.target.release.labels."org.opencontainers.image.description"')" >> $GITHUB_ENV + + - name: Update Docker Hub Description + if: github.event_name != 'pull_request' + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} + password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} + repository: boxcutter/${{ env.image_name }} + short-description: ${{ env.image_description }} + readme-filepath: ${{ matrix.image }}/README.md \ No newline at end of file diff --git a/aws-cli/docker-bake.hcl b/aws-cli/docker-bake.hcl index 5f4791a..6ddf1ab 100644 --- a/aws-cli/docker-bake.hcl +++ b/aws-cli/docker-bake.hcl @@ -36,5 +36,6 @@ target "default" { "org.opencontainers.image.source" = "https://github.com/polymathrobotics/oci" "org.opencontainers.image.licenses" = "Apache-2.0" "org.opencontainers.image.description" = "AWS command-line interface." + "org.opencontainers.image.title" = "aws-cli" } }