Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
azahnen committed Oct 9, 2024
1 parent 421a157 commit 31a3f9e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/xtractl-snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: xtractl-snapshot

on: [push]

jobs:
bin:
runs-on: ubuntu-latest
container:
image: docker://ghcr.io/ldproxy/golang-jdk:1.2
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
steps:
- name: clone
uses: actions/checkout@v4
- name: build
uses: docker://ghcr.io/ldproxy/golang-jdk:1.2
working-directory: ./xtractl
env:
CI_COMMIT_BRANCH: ${{ github.ref_name }}
CI_COMMIT_SHA: ${{ github.sha }}
CI_COMMIT_TAG: ${{ github.ref_type == 'tag' && github.ref_name || '' }}
with:
entrypoint: /bin/bash
args: cd ${{ github.workspace }}/xtractl && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/xtractl -ldflags="-s -w -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitTag=${CI_COMMIT_TAG} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitSha=${CI_COMMIT_SHA} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitBranch=${CI_COMMIT_BRANCH}"
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/linux-amd64/xtractl -ldflags="-s -w -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitTag=${CI_COMMIT_TAG} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitSha=${CI_COMMIT_SHA} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitBranch=${CI_COMMIT_BRANCH}"
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o dist/linux-arm64/xtractl -ldflags="-s -w -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitTag=${CI_COMMIT_TAG} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitSha=${CI_COMMIT_SHA} -X github.com/interactive-instruments/xtraplatform-cli/xtractl/cmd.gitBranch=${CI_COMMIT_BRANCH}"

0 comments on commit 31a3f9e

Please sign in to comment.