File tree Expand file tree Collapse file tree 2 files changed +42
-6
lines changed Expand file tree Collapse file tree 2 files changed +42
-6
lines changed Original file line number Diff line number Diff line change 11name : Setup Atlas
22run-name : I'm using Atlas 🚀
3- on : [push]
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ branches :
9+ - master
410jobs :
5- use-atlas :
6- runs-on : ubuntu-latest
11+ test-versions :
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ runs-on : ${{ matrix.os }}
716 steps :
817 - uses : actions/checkout@v4
9- - uses : ./
10- - run : atlas version
18+ - name : Install Latest Atlas
19+ uses : ./
20+ - name : Get Atlas Version
21+ id : atlas-version
22+ shell : bash
23+ run : |
24+ VERSION=$(atlas version | awk '{print $3}')
25+ echo "version=$VERSION" >> $GITHUB_OUTPUT
26+ - name : Install Specific Version
27+ uses : ./
28+ with :
29+ version : ${{ steps.atlas-version.outputs.version }}
30+ - name : Verify Version
31+ shell : bash
32+ run : |
33+ INSTALLED_VERSION=$(atlas version | awk '{print $3}')
34+ if [ "$INSTALLED_VERSION" != "${{ steps.atlas-version.outputs.version }}" ]; then
35+ echo "Version mismatch: expected ${{ steps.atlas-version.outputs.version }}, got $INSTALLED_VERSION"
36+ exit 1
37+ fi
Original file line number Diff line number Diff line change @@ -15,8 +15,17 @@ inputs:
1515runs :
1616 using : " composite"
1717 steps :
18- - run : curl -sSf https://atlasgo.sh | ATLAS_VERSION=${{inputs.version}} CI=true sh
18+ - if : runner.os != 'Windows'
1919 shell : bash
20+ run : curl -sSf https://atlasgo.sh | ATLAS_VERSION=${{inputs.version}} CI=true sh
21+ - if : runner.os == 'Windows'
22+ shell : pwsh
23+ run : |
24+ $url = "https://release.ariga.io/atlas/atlas-windows-amd64-${{ inputs.version }}.exe"
25+ $targetPath = "$env:LocalAppData\Programs\Atlas"
26+ New-Item -Path $targetPath -ItemType Directory -Force
27+ curl -L $url -o "$targetPath\atlas.exe"
28+ Add-Content $env:GITHUB_PATH "$targetPath"
2029 - name : Login to Atlas
2130 if : inputs.cloud-token != null
2231 shell : bash
You can’t perform that action at this time.
0 commit comments