container path env fix on release workflow #42
Workflow file for this run
This file contains hidden or 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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| actions: write | |
| attestations: write | |
| packages: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/sarus-suite/parallax/ci-runner:latest | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| GITHUB_REF: ${{ github.ref }} | |
| GITHUB_EVENT_PATH: ${{ github.event_path }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Verify Go | |
| run: | | |
| go version | |
| go env | |
| - name: Install go deps | |
| run: go get . | |
| - name: Build Linux binaries | |
| env: | |
| GOFLAGS: "-buildvcs=false" | |
| GOOS: linux | |
| run: | | |
| mkdir -p dist | |
| for arch in amd64; do | |
| GOARCH=$arch go build \ | |
| -ldflags "-X 'github.com/sarus-suite/parallax/version.Version=${{ github.ref_name }}'" \ | |
| -o dist/parallax-${{ github.ref_name }}-linux-$arch \ | |
| . | |
| done | |
| - name: Create GitHub Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }}-a | |
| release_name: Release ${{ github.ref_name }}-a | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload amd64 binary | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: dist/parallax-${{ github.ref_name }}-linux-amd64 | |
| asset_name: parallax-${{ github.ref_name }}-linux-amd64 | |
| asset_content_type: application/octet-stream | |
| # - name: Upload arm64 binary | |
| # uses: actions/upload-release-asset@v1 | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # with: | |
| # upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| # asset_path: dist/parallax-${{ github.ref_name }}-linux-arm64 | |
| # asset_name: parallax-${{ github.ref_name }}-linux-arm64 | |
| # asset_content_type: application/octet-stream | |