diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index de3a60907..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: GitHub CI - -on: - pull_request: - push: - workflow_dispatch: - schedule: - - cron: 0 0 * * 0 - -defaults: - run: - shell: 'bash -Eeuo pipefail -x {0}' - -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - -jobs: - - generate-jobs: - name: Generate Jobs - runs-on: ubuntu-latest - outputs: - strategy: ${{ steps.generate-jobs.outputs.strategy }} - steps: - - uses: actions/checkout@v4 - - uses: docker-library/bashbrew@HEAD - - id: generate-jobs - name: Generate Jobs - run: | - strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" - - # https://github.com/docker-library/python/pull/706 (ensure we don't have any unexpected ".a" leftovers in "/usr/local") - strategy="$(jq <<<"$strategy" -c ' - .matrix.include |= map( - if .os == "ubuntu-latest" then - .runs.test += "\n" + ( - .meta.entries - | map( - .tags[0] - | "aFiles=\"$(docker run --rm \(. | @sh) find /usr/local -name \"*.a\" | tee /dev/stderr)\"; [ -z \"$aFiles\" ]" - ) - | join("\n") - ) - else . end - ) - ')" - - EOF="EOF-$RANDOM-$RANDOM-$RANDOM" - echo "strategy<<$EOF" >> "$GITHUB_OUTPUT" - jq <<<"$strategy" . | tee -a "$GITHUB_OUTPUT" - echo "$EOF" >> "$GITHUB_OUTPUT" - - test: - needs: generate-jobs - strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }} - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Prepare Environment - run: ${{ matrix.runs.prepare }} - - name: Pull Dependencies - run: ${{ matrix.runs.pull }} - - name: Build ${{ matrix.name }} - run: ${{ matrix.runs.build }} - - name: History ${{ matrix.name }} - run: ${{ matrix.runs.history }} - - name: Test ${{ matrix.name }} - run: ${{ matrix.runs.test }} - - name: '"docker images"' - run: ${{ matrix.runs.images }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..5448d2edd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,50 @@ +name: Build-Dev + +on: + workflow_dispatch: # 使用 workflow_dispatch 事件触发 + # pull_request: + # branches: [ "main" ] + # push: + # branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Docker Login + # You may pin to the exact commit or the version. + # uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 + uses: docker/login-action@v3.3.0 + with: + # Username used to log against the Docker registry + username: ${{ secrets.DOCKERHUB_USER }} + # Password or personal access token used to log against the Docker registry + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: FetchTimestamp + id: timestamp + run: echo "TIMESTAMP=$(date '+%y%m%d')" >> $GITHUB_ENV + + - name: FetchGitHash + id: git-hash + run: echo "GIT_HASH=$(git rev-parse HEAD | cut -c1-4)" >> $GITHUB_ENV + + - name: SetEnvVar + run: | + echo "IMAGE_VERSION=${{ env.TIMESTAMP }}-${{ env.GIT_HASH }}" >> $GITHUB_ENV + echo "IMAGE_TAG=slim-${{ env.TIMESTAMP }}-${{ env.GIT_HASH }}" >> $GITHUB_ENV + + - name: ECHO IMAGE_TAG + run: echo $IMAGE_TAG + + - name: BuildDockerImage + run: cd ./3.9/slim-bullseye && docker build -t standardcore/python-ffmpeg:${{ env.IMAGE_TAG }} . + + - name: PushDockerImage + run: docker push standardcore/python-ffmpeg:${{ env.IMAGE_TAG }} diff --git a/.github/workflows/verify-templating.yml b/.github/workflows/verify-templating.yml deleted file mode 100644 index 2e1fb7872..000000000 --- a/.github/workflows/verify-templating.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Verify Templating - -on: - pull_request: - push: - -defaults: - run: - shell: 'bash -Eeuo pipefail -x {0}' - -jobs: - apply-templates: - name: Check For Uncomitted Changes - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Apply Templates - run: ./apply-templates.sh - - name: Check Git Status - run: | - status="$(git status --short)" - [ -z "$status" ] diff --git a/3.9/slim-bullseye/Dockerfile b/3.9/slim-bullseye/Dockerfile index 5e6517b00..b8413ad2c 100644 --- a/3.9/slim-bullseye/Dockerfile +++ b/3.9/slim-bullseye/Dockerfile @@ -52,7 +52,8 @@ RUN set -eux; \ uuid-dev \ wget \ xz-utils \ - zlib1g-dev \ + zlib1g-dev \ + ffmpeg \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \