-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add input to specify the build url to use
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
name: "Docker Desktop action" | ||
description: "Start Docker Desktop on a Github Action node" | ||
inputs: | ||
docker-desktop-build-url: | ||
description: "Docker Desktop build url to use for installation" | ||
required: false | ||
default: "latest" | ||
runs: | ||
using: "composite" | ||
steps: | ||
|
@@ -81,6 +86,27 @@ runs: | |
/usr/bin/open /Applications/Docker.app --args --unattended --add-host-docker-internal-registry | ||
echo "Docker starting..." | ||
- name: Download appcast | ||
if: runner.os == 'Linux' | ||
shell: bash | ||
run: | | ||
curl https://desktop.docker.com/linux/main/amd64/appcast.xml -o appcast.xml | ||
- name: Get Docker Desktop latest build url | ||
if: runner.os == 'Linux' && inputs.docker-desktop-build-url == 'latest' | ||
uses: mavrosxristoforos/[email protected] | ||
id: get-latest-build-url | ||
with: | ||
xml-file: appcast.xml | ||
xpath: //channel/link | ||
|
||
- name: Define the build URL to use | ||
if: runner.os == 'Linux' | ||
shell: bash | ||
id: get-build-url | ||
run: | ||
echo "info=${{ inputs.docker-desktop-build-url || steps.get-latest-build-url.outputs.info }}" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache Docker Desktop packages | ||
if: runner.os == 'Linux' | ||
id: cache-docker-desktop | ||
|
@@ -95,7 +121,7 @@ runs: | |
shell: bash | ||
run: | | ||
mkdir -p ~/.downloads | ||
curl -sSL https://desktop.docker.com/linux/main/amd64/docker-desktop-4.25.0-amd64.deb > ~/.downloads/docker-desktop.deb | ||
curl -sSL ${{ steps.get-build-url.outputs.info }} > ~/.downloads/docker-desktop.deb | ||
- name: Check for CPU with VM support | ||
if: runner.os == 'Linux' | ||
|