Update docker-image.yml

This commit is contained in:
losehu 2023-12-08 22:49:38 +08:00 committed by GitHub
parent a8effcf064
commit 6f6bf98b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,25 +24,25 @@ jobs: #定义工作流程
- name: safe.directory #设置 git 的 safe.directory 配置 - name: safe.directory #设置 git 的 safe.directory 配置
run: git config --global --add safe.directory /__w/uv-k5-firmware-chinese/uv-k5-firmware-chinese run: git config --global --add safe.directory /__w/uv-k5-firmware-chinese/uv-k5-firmware-chinese
- name: Make - name: Make #执行 make 命令
run: make run: make #编译项目
- name: size - name: size #计算 firmware 大小
run: arm-none-eabi-size firmware run: arm-none-eabi-size firmware #使用 arm-none-eabi-size 命令计算固件大小
- name: Upload Artifact - name: Upload Artifact #上传固件文件
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3 #使用 GitHub Actions 提供的 upload-artifact 动作
with: with:
name: firmware name: firmware #设置 artifact 名称为 firmware
path: firmware*.bin path: firmware*.bin #上传文件路径为 firmware*.bin
- name: Upload binaries to release - name: Upload binaries to release #将二进制文件上传到 release
if: ${{ startsWith(github.ref, 'refs/tags/v') }} if: ${{ startsWith(github.ref, 'refs/tags/v') }} #设置条件,当 ref 以 'refs/tags/v' 开头时执行
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2 #使用 GitHub Actions 提供的 upload-release-action 动作
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }} #GitHub token
file: firmware.packed.bin file: firmware.packed.bin #要上传的文件
asset_name: LoseHu_$tag.bin asset_name: LoseHu_$tag.bin #上传的文件名
tag: ${{ github.ref }} tag: ${{ github.ref }} #GitHub ref
overwrite: true overwrite: true #覆盖已有的文件
release_name: release ${{ github.ref_name }} release_name: release ${{ github.ref_name }} #发布名称为 release + ref 名称