mirror of
https://github.com/house-of-vanity/khm.git
synced 2025-08-21 14:27:14 +00:00
Update main.yml
This commit is contained in:
committed by
GitHub
parent
72419aaabd
commit
c01714d8ce
46
.github/workflows/main.yml
vendored
46
.github/workflows/main.yml
vendored
@@ -54,7 +54,7 @@ jobs:
|
|||||||
path: target/${{ matrix.build_target }}/release/${{ env.BINARY_NAME }}*
|
path: target/${{ matrix.build_target }}/release/${{ env.BINARY_NAME }}*
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create and upload release
|
name: Create Release Page
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@@ -93,7 +93,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
name: Download ${ env.BINARY_NAME }_${{ matrix.platform_name }} artifact
|
name: Download ${{ matrix.platform_name }} artifact
|
||||||
with:
|
with:
|
||||||
name: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}
|
name: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}
|
||||||
path: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}
|
path: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}
|
||||||
@@ -106,3 +106,45 @@ jobs:
|
|||||||
asset_path: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}/${{ env.BINARY_NAME }}${{ matrix.platform_name == 'windows-amd64' && '.exe' || '' }}
|
asset_path: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}/${{ env.BINARY_NAME }}${{ matrix.platform_name == 'windows-amd64' && '.exe' || '' }}
|
||||||
asset_name: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}${{ matrix.platform_name == 'windows-amd64' && '.exe' || '' }}
|
asset_name: ${{ env.BINARY_NAME }}_${{ matrix.platform_name }}${{ matrix.platform_name == 'windows-amd64' && '.exe' || '' }}
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
|
|
||||||
|
|
||||||
|
build_docker:
|
||||||
|
name: Build and Publish Docker Image
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
name: Download Linux artifact
|
||||||
|
with:
|
||||||
|
name: ${{ env.BINARY_NAME }}_linux-amd64
|
||||||
|
path: ${{ env.BINARY_NAME }}_linux-amd64
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ultradesu
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set exec flag
|
||||||
|
run: |
|
||||||
|
chmod +x ${{ env.BINARY_NAME }}_linux-amd64/khm
|
||||||
|
|
||||||
|
- name: Set outputs
|
||||||
|
id: get_tag
|
||||||
|
run: |
|
||||||
|
echo "tag=$(echo ${GITHUB_REF} | cut -d'/' -f2)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ultradesu/${{ env.BINARY_NAME }}:latest,ultradesu/${{ env.BINARY_NAME }}:${{ steps.vars.outputs.tag }}
|
||||||
|
Reference in New Issue
Block a user