From 2a5f0e186d542ace5780efcbe44444078581bcbc Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Wed, 28 Feb 2024 11:38:10 -0800 Subject: [PATCH] more actions refactoring --- .github/actions/docker-setup/action.yml | 30 ------------------- .../workflows/{stage.yml => artifacts.yml} | 27 ++++++++++++++++- 2 files changed, 26 insertions(+), 31 deletions(-) delete mode 100644 .github/actions/docker-setup/action.yml rename .github/workflows/{stage.yml => artifacts.yml} (66%) diff --git a/.github/actions/docker-setup/action.yml b/.github/actions/docker-setup/action.yml deleted file mode 100644 index a9c5bb22..00000000 --- a/.github/actions/docker-setup/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "Set up Docker" -description: "Ensure latest Docker with container engine & containerd storage backend" -runs: - using: "composite" - steps: - - name: Setup Latest docker - shell: 'script -q -e -c "bash {0}"' - run: | - for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done - sudo apt-get update - sudo apt-get install ca-certificates curl - sudo install -m 0755 -d /etc/apt/keyrings - sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc - sudo chmod a+r /etc/apt/keyrings/docker.asc - echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] 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 - cat << EOF >/etc/docker/daemon.json - { - "features": { - "containerd-snapshotter": true - }, - "registry-mirrors": ["https://ghcr.io/tkhq"] - } - EOF - sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - systemctl restart docker - docker buildx create --driver docker-container --bootstrap --name build --use diff --git a/.github/workflows/stage.yml b/.github/workflows/artifacts.yml similarity index 66% rename from .github/workflows/stage.yml rename to .github/workflows/artifacts.yml index 6bc08ad4..1fe4b903 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/artifacts.yml @@ -24,7 +24,32 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup and configure docker - uses: ./.github/actions/docker-setup + shell: 'script -q -e -c "bash {0}"' + run: | + for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; \ + do apt-get remove $pkg; \ + done + apt-get update + apt-get install ca-certificates curl + install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc + chmod a+r /etc/apt/keyrings/docker.asc + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + tee /etc/apt/sources.list.d/docker.list > /dev/null + apt-get update + cat << EOF >/etc/docker/daemon.json + { + "features": { + "containerd-snapshotter": true + }, + "registry-mirrors": ["https://ghcr.io/tkhq"] + } + EOF + apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + systemctl restart docker + docker buildx create --driver docker-container --bootstrap --name build --use - name: Run `make` shell: 'script -q -e -c "bash {0}"'