mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
1cdcb480b1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 4.6.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1...ea165f8d65b6e75b540449e92b4886f43607fa02) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
76 lines
2.3 KiB
YAML
76 lines
2.3 KiB
YAML
name: PR - Docker build test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/docker-test.yml'
|
|
- 'lib/**'
|
|
- 'Dockerfile'
|
|
- 'package.json'
|
|
- 'pnpm-lock.yaml'
|
|
types: [opened, reopened, synchronize, edited]
|
|
# Please, always create a pull request instead of push to master.
|
|
|
|
concurrency:
|
|
group: docker-test-${{ github.ref_name }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Docker build & tests
|
|
permissions:
|
|
pull-requests: write
|
|
attestations: write
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Set up Docker Buildx # needed by `cache-from`
|
|
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
|
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
|
|
with:
|
|
images: rsshub
|
|
flavor: latest=true
|
|
|
|
- name: Build Docker image
|
|
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
|
|
with:
|
|
context: .
|
|
build-args: PUPPETEER_SKIP_DOWNLOAD=0 # also test bundling Chromium
|
|
load: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
platforms: linux/amd64 # explicit
|
|
cache-from: |
|
|
type=registry,ref=${{ secrets.DOCKER_USERNAME }}/rsshub:chromium-bundled
|
|
type=gha,scope=docker-release
|
|
|
|
- name: Pull Request Labeler
|
|
if: ${{ failure() }}
|
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
|
with:
|
|
actions: 'add-labels'
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
issue-number: ${{ github.event.pull_request.number }}
|
|
labels: 'Auto: Route Test Failed'
|
|
|
|
- name: Test Docker image
|
|
run: bash scripts/docker/test-docker.sh
|
|
|
|
- name: Export Docker image
|
|
run: docker save rsshub:latest | zstdmt -o rsshub.tar.zst
|
|
|
|
- name: Upload Docker image
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: docker-image
|
|
path: rsshub.tar.zst
|
|
retention-days: 1
|