Skip to content

check running containers and update status #15

check running containers and update status

check running containers and update status #15

Workflow file for this run

name: Go Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
run: |
sudo apt update
sudo apt install -y golang
go version
- name: Set up Go environment
run: |
mkdir -p $HOME/go/{bin,src,pkg}
echo "export GOPATH=$HOME/go" >> $HOME/.bashrc
echo "export PATH=$PATH:$HOME/go/bin" >> $HOME/.bashrc
source $HOME/.bashrc
- name: Install dependencies
run: go mod tidy
- name: Create required directories
run: |
mkdir -p /tmp/basic-docker/containers
mkdir -p /tmp/basic-docker/images
- name: Build project with error handling
run: |
echo "==== Building Project ===="
if ! go build -o basic-docker main.go; then
echo "Error: Build failed. Please check the errors above." >&2
exit 1
fi
- name: Run verification script
run: |
chmod +x verify.sh
./verify.sh