Skip to content

Commit

Permalink
Update workflow files for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuo committed Aug 25, 2024
1 parent fe25e9d commit 5d7d705
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: Build

on: [ push, pull_request ]

Expand Down Expand Up @@ -40,12 +40,27 @@ jobs:
run: echo "GOSS_USE_ALPHA=1" >> "$GITHUB_ENV"

- if: runner.os == 'macOS'
name: Setup docker
run: |
curl -L "https://github.com/goss-org/goss/archive/${{ env.goss_commit_hash }}.tar.gz" -o goss.tar.gz
tar xzvf goss.tar.gz
cd "goss-${{ env.goss_commit_hash }}"
make build
cd ..
brew install docker colima
colima start
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN_202506 }}

- if: runner.os == 'macOS'
name: Pull from GitHub Container Registry
run: |
docker pull --platform=linux/amd64 ghcr.io/matsuo/goss:latest
docker run --platform=linux/amd64 --rm -i -v /$(pwd):/tmp ghcr.io/matsuo/goss:latest bash <<'EOF'
cd /root/go/src/github.com/goss-org/goss
cp ./release/goss-darwin-amd64 /tmp/goss-darwin-amd64
cp ./release/goss-darwin-arm64 /tmp/goss-darwin-arm64
EOF
- if: runner.os == 'Windows'
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: Release

on:
push:
Expand Down

0 comments on commit 5d7d705

Please sign in to comment.