Skip to content

Commit

Permalink
🚀 adjust build-package flow
Browse files Browse the repository at this point in the history
  • Loading branch information
anngdinh committed Jun 27, 2024
1 parent 1c3ad09 commit acc2f96
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/build-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ jobs:
run: NIGHTLY=vmonitor make package include_packages="freebsd_amd64.tar.gz linux_amd64.tar.gz amd64.deb x86_64.rpm"
# run: NIGHTLY=vmonitor make package include_packages="freebsd_amd64.tar.gz linux_amd64.tar.gz amd64.deb x86_64.rpm linux_arm64.tar.gz arm64.deb aarch64.rpm freebsd_i386.tar.gz i386.deb linux_i386.tar.gz i386.rpm"

# - name: Install Windows dependencies
# run: go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest && export PATH=~/go/bin
- name: Install Windows dependencies
run: go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest && export PATH=~/go/bin

# - name: Build Windows package
# run: NIGHTLY=vmonitor make package include_packages="windows_amd64.zip"
# # run: NIGHTLY=vmonitor make package include_packages="windows_i386.zip windows_amd64.zip windows_arm64.zip"
- name: Build Windows package
run: NIGHTLY=vmonitor make package include_packages="windows_i386.zip windows_amd64.zip windows_arm64.zip"

- name: Debug
run: ls -al ./build/dist/
Expand All @@ -63,6 +62,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to the vCR
uses: docker/login-action@v3
with:
registry: vcr.vngcloud.vn
username: ${{ secrets.VCR_USER_PRO }}
password: ${{ secrets.VCR_PASSWORD_PRO }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand All @@ -74,6 +80,8 @@ jobs:
tags: |
ghcr.io/${{ github.repository_owner }}/telegraf:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/telegraf:${{ github.sha }}
vcr.vngcloud.vn/81-vmp-public/telegraf:${{ github.ref_name }}
vcr.vngcloud.vn/81-vmp-public/telegraf:${{ github.sha }}
# labels: ${{ steps.metadata.outputs.labels }}

- name: Build and push Docker image Alpine
Expand All @@ -87,4 +95,6 @@ jobs:
tags: |
ghcr.io/${{ github.repository_owner }}/telegraf:${{ github.ref_name }}-alpine
ghcr.io/${{ github.repository_owner }}/telegraf:${{ github.sha }}-alpine
vcr.vngcloud.vn/81-vmp-public/telegraf:${{ github.ref_name }}-alpine
vcr.vngcloud.vn/81-vmp-public/telegraf:${{ github.sha }}-alpine
# labels: ${{ steps.metadata.outputs.labels }}

0 comments on commit acc2f96

Please sign in to comment.