ci: 合并程序构建和容器镜像构建
Some checks failed
Gitea Actions Demo / build (push) Failing after 42s

This commit is contained in:
Ivan Li 2023-05-22 10:30:57 +08:00
parent c9646bd2c8
commit f3ae0a4b3c

View File

@ -4,6 +4,11 @@ on: [push, pull_request]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
REGISTRY: git.ivanli.cc
IMAGE_NAME: ${{ github.repository }}
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -39,36 +44,6 @@ jobs:
- name: Build - name: Build
run: cargo build --release run: cargo build --release
- name: Archive Executable Binary
uses: https://github.com/actions/upload-artifact@v3
with:
path: ./target/release/network-monitor
name: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }}
docker:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
needs: build
env:
REGISTRY: git.ivanli.cc
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Get Commit Tag
id: tag
uses: https://github.com/Maxyme/get-release-or-tag@v2
- name: Download Executable Binary
uses: https://github.com/actions/download-artifact@v3
with:
path: ./target/release/network-monitor
name: ${{ runner.os }}-release-${{ steps.tag.outputs.tag }}
- 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
with: with: