From abdf945c8de6ef6b5b33fe5723f5f002d3868d6c Mon Sep 17 00:00:00 2001 From: maximo tejeda Date: Thu, 14 Nov 2024 11:24:32 -0400 Subject: [PATCH] ADD env set to test workflow --- .github/workflows/tags.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tags.yml b/.github/workflows/tags.yml index 8345066..08ac47e 100644 --- a/.github/workflows/tags.yml +++ b/.github/workflows/tags.yml @@ -15,35 +15,26 @@ jobs: - name: install dependencies run: go mod tidy + - name: set env + run: | + echo "TOKEN=${{ secrets.TOKEN }}" >> GITHUB_ENV + echo "USERNAME=${{ vars.USERNAME }}" >> GITHUB_ENV + echo "TAG_VERSION=${{ github.ref_name }}" >> GITHUB_ENV + echo "SHORTSHA="$(git rev-parse --short HEAD)" >> GITHUB_ENV + - name: Build amd64 - env: - USERNAME: ${{ vars.USERNAME }} - TOKEN: ${{ secrets.TOKEN }} - TAG_VERSION: ${{ github.ref_name }} run: | GOOS=linux GOARCH=amd64 go build -o bin/ddns_amd64_$TAG_VERSION ./cmd/... - name: Build arm64 - env: - USERNAME: ${{ vars.USERNAME }} - TOKEN: ${{ secrets.TOKEN }} - TAG_VERSION: ${{ github.ref_name }} run: | GOOS=linux GOARCH=arm64 go build -o bin/ddns_arm64_$TAG_VERSION ./cmd/... - name: push generic registry amd64 - env: - USERNAME: ${{ vars.USERNAME }} - TOKEN: ${{ secrets.TOKEN }} - TAG_VERSION: ${{ github.ref_name }} run: | curl --user $USERNAME:$TOKEN --upload-file bin/ddns_amd64_$TAG_VERSION http://10.0.0.171/api/packages/$USERNAME/generic/ddns/amd64_$TAG_VERSION/ddns - name: push generic registry amd64 - env: - USERNAME: ${{ vars.USERNAME }} - TOKEN: ${{ secrets.TOKEN }} - TAG_VERSION: ${{ github.ref_name }} run: | curl --user $USERNAME:$TOKEN --upload-file bin/ddns_arm64_$TAG_VERSION http://10.0.0.171/api/packages/$USERNAME/generic/ddns/arm64_$TAG_VERSION/ddns