Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Meister <dennis.meister@bosch.com>
  • Loading branch information
dennismeister93 committed Aug 14, 2023
1 parent 5fae908 commit cfc7afe
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"containerEnv": {
"GITHUB_API_TOKEN": "${localEnv:GITHUB_API_TOKEN}"
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2.3.0": {}
},
"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
Expand Down
6 changes: 0 additions & 6 deletions .github/scripts/deploy_image_from_artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ HELM_CONFIG_DIR="$HOME/.velocitas/packages/devenv-runtimes/$RUNTIME_VERSION/runt
local_tag="$APP_REGISTRY/$APP_NAME_LOWERCASE:local"
echo "Local URL: $local_tag"

echo "Print content of tar"

tar -ztvf $APP_ARTIFACT_NAME.tar

echo "Load tar file"

docker load -i "$APP_ARTIFACT_NAME.tar" | sed -n 's/^Loaded image ID: sha256:\([0-9a-f]*\).*/\1/p' | xargs -i docker tag {} $local_tag
docker push $local_tag

Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ jobs:
with:
submodules: "recursive"

- name: Check Docker Version
run: docker version
- name: Install Latest Docker
run: |
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
VERSION_STRING=5:23.0.6-1~ubuntu.22.04~jammy
sudo apt-get install -y docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
- name: Check Docker Version
run: docker version

- name: Clone Release Documentation Action repository
uses: actions/checkout@v3
with:
Expand All @@ -64,7 +84,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.9.0
version: v0.11.2

- id: github-repository-name-case-adjusted
name: Prepare repository name in lower case for docker upload. This supports repository names in mixed case
Expand All @@ -85,6 +105,7 @@ jobs:
run: |
git config --global user.email "github-automation@users.noreply.github.com"
git config --global user.name "Github Automation"
git config --global --add safe.directory $( pwd )
- name: Set Platform(s) String
id: set_platforms
Expand Down Expand Up @@ -115,6 +136,11 @@ jobs:
labels: |
org.opencontainers.image.source=https://github.com/${{steps.github-repository-name-case-adjusted.outputs.lowercase}}
- name: Test docker load
run: |
tar -tvf "./${{ matrix.component.name }}.tar"
docker load -i "./${{ matrix.component.name }}.tar"
- name: "Install skopeo"
run: |
sudo apt-get update
Expand Down

0 comments on commit cfc7afe

Please sign in to comment.