updating docker compose for ARM #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Compose Validation | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'docker-compose*.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'docker-compose*.yml' | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Docker repository | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
ca-certificates \ | |
curl \ | |
gnupg | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt-get update | |
- name: Install Docker Compose | |
run: | | |
sudo apt-get install -y docker-compose-plugin | |
- name: Validate Docker Compose files | |
run: | | |
docker compose -f docker-compose.yml config > /dev/null | |
docker compose -f docker-compose-arm.yml config > /dev/null | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install yamllint | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y yamllint | |
- name: Create yamllint config | |
run: | | |
echo "extends: default | |
rules: | |
document-start: disable | |
line-length: disable | |
truthy: disable" > .yamllint.yml | |
- name: Lint Docker Compose files | |
run: | | |
yamllint -c .yamllint.yml docker-compose.yml | |
yamllint -c .yamllint.yml docker-compose-arm.yml |