-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reusable workflow steps for smoke tests and docker downgrade workaround
Signed-off-by: Kimmo Lehto <[email protected]>
- Loading branch information
Showing
2 changed files
with
63 additions
and
154 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Smoke test cache steps | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Docker downgrade (workaround) | ||
shell: bash | ||
run: | | ||
# TODO: Remove this once github runner docker version problems with bootloose are resolved properly | ||
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 | ||
sudo apt-get install -y --allow-downgrades docker-ce=5:24.0.9-1~ubuntu.20.04~focal docker-ce-cli=5:24.0.9-1~ubuntu.20.04~focal containerd.io | ||
sudo systemctl restart docker | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
check-latest: true | ||
|
||
- name: Download compiled binary artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: k0sctl | ||
path: . | ||
|
||
- name: k0sctl cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: k0sctl-cache | ||
path: | | ||
/var/cache/k0sctl/k0s | ||
~/.cache/k0sctl/k0s | ||
- name: kubectl cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
smoke-test/kubectl | ||
key: "kubectl-${{ hashFiles('smoke-test/smoke.common.sh') }}" | ||
|
||
- name: Make binaries executable | ||
shell: bash | ||
run: | | ||
chmod +x k0sctl || true | ||
chmod +x smoke-test/kubectl || true |
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