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 615db61
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
21 changes: 15 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 @@ -39,13 +39,22 @@ jobs:
- shell: bash
run: echo "GOSS_USE_ALPHA=1" >> "$GITHUB_ENV"

- 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: |
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 ..
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 615db61

Please sign in to comment.