[other] Github的action(workflow)有没有什么限制?
Tofloor
poster avatar
raspbian
deepin
2024-03-07 22:51
Author

最近在学习GitHub workflow 构建docker image

因为我要用的最终镜像大概10G

看运行过程docker build 并不会使用上一次的cache

一直都是全新下载

我是免费用户,这东西有没有什么极限,或者到达什么程度就该交钱的说法?

# 基础镜像
# docker pull golang:1.22.1-bookworm
# docker run -dit --name=test usewhisper:v0.0.1 -v /mnt/e/video/srt:/srt -e language=en bash
FROM golang:1.22.1-bookworm
# 用于存储程序和视频字幕文件的文件夹
VOLUME /srt
RUN apt update && apt full-upgrade
RUN apt install -y ffmpeg python3 python3-pip vim nano mediainfo wget git
RUN mkdir /module
RUN wget https://openaipublic.azureedge.net/main/whisper/models/ed3a0b6b1c0edf879ad9b11b1af5a0e6ab5db9205f891f668f8b0e6c6326e34e/base.pt -O /module/base.pt --no-check-certificate
RUN go env -w GO111MODULE=on
# RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN git clone https://github.com/zhangyiming748/WhisperInDocker.git /root/WhisperInDocker
WORKDIR /root/WhisperInDocker
RUN go mod tidy
RUN go build -o /usr/local/bin/srt main.go
CMD ["srt"]
# .github/workflows/release.yml
name: goreleaser

on:
  pull_request:
  push:
    # run only against tags
    tags:
      - "*"
    branches: [ "master" ]

permissions:
  contents: write
  # packages: write
  # issues: write

jobs:
  dockerbuilder:
    runs-on: ubuntu-latest
    steps:
      - name: pwd
        run: pwd
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: build
        run: docker build -t whisper:latest /home/runner/work/WhisperInDocker/WhisperInDocker
      - name: export
        # run: docker save whisper:latest -o whisper.tar
        run: docker save whisper:latest | xz > whisper.tar
      # More assembly might be required: Docker logins, GPG, etc.
      # It all depends on your needs.
      - name: Upload Build Artifacts
        uses: actions/upload-artifact@v4
        with:
          name: workspace_artifacts
          path: ${{ github.workspace }}
Reply Favorite View the author
All Replies
187******09
deepin
2024-03-08 10:53
#1

GitHub官方文档

对于免费用户:

  • 每个 workflow 可以运行35天
  • 每个 job 单次可以运行6小时
  • 每个存储库1小时内可以访问1000次 GitHub API
  • 并发 job 是20个(其中 macOS 的 job 是5个)

基本限制就是这些

Reply View the author
raspbian
deepin
2024-03-08 11:12
#2
187******09

GitHub官方文档

对于免费用户:

  • 每个 workflow 可以运行35天
  • 每个 job 单次可以运行6小时
  • 每个存储库1小时内可以访问1000次 GitHub API
  • 并发 job 是20个(其中 macOS 的 job 是5个)

基本限制就是这些

谢谢大佬

Reply View the author