ci: use archive
Some checks failed
Gitea Actions Demo / build (push) Failing after 49s
Gitea Actions Demo / docker (push) Has been skipped

This commit is contained in:
Ivan Li 2023-05-22 01:09:36 +08:00
parent 6717bb5e2f
commit c9646bd2c8

View File

@ -39,20 +39,11 @@ jobs:
- name: Build - name: Build
run: cargo build --release run: cargo build --release
- name: Cache Executable Binary - name: Archive Executable Binary
uses: https://github.com/actions/cache/save@v3 uses: https://github.com/actions/upload-artifact@v3
with: with:
path: ./target/release/network-monitor path: ./target/release/network-monitor
key: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }} name: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }}
- id: restore-executable-binary
name: Restore Executable Binary
uses: https://github.com/actions/cache/restore@v3
with:
path: ./target/release/network-monitor
key: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }}
fail-on-cache-miss: true
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -72,13 +63,11 @@ jobs:
id: tag id: tag
uses: https://github.com/Maxyme/get-release-or-tag@v2 uses: https://github.com/Maxyme/get-release-or-tag@v2
- id: restore-executable-binary - name: Download Executable Binary
name: Restore Executable Binary uses: https://github.com/actions/download-artifact@v3
uses: https://github.com/actions/cache/restore@v3
with: with:
path: ./target/release/network-monitor path: ./target/release/network-monitor
key: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }} name: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }}
fail-on-cache-miss: true
- name: Log in to the Container registry - name: Log in to the Container registry
uses: https://github.com/docker/login-action@v2 uses: https://github.com/docker/login-action@v2