Skip to content

Change container name #2

Change container name

Change container name #2

Workflow file for this run

name: Docker Build and Test
on:
push:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
tags: test-container
context: .
push: false
- name: Run container
id: run
run: |
docker run --name test-container -d YOUR_IMAGE_NAME
- name: Compile examples
run: |
docker exec test-container bash -c "cd /path/to/examples && make"
- name: Test sudo
run: |
docker exec test-container bash -c "sudo apt-get update"