├── .editorconfig ├── .github ├── labeler.yml ├── renovate.json5 ├── workflows │ ├── archive-page.yml │ ├── brew-debug.yml │ ├── brew-regression-build.yml │ ├── brew-regression.yml │ ├── chenrui-dev.yml │ ├── compress-images.yml │ ├── credentials.yml │ ├── delete-event.yml │ ├── display-github-context.yml │ ├── docker.yml │ ├── hurl.yml │ ├── labeler.yml │ ├── lang-go.yml │ ├── lang-java.yml │ ├── link-checker.yml │ ├── release.yml │ ├── repository-dispatch.yml │ ├── scripts │ │ └── install_homebrew.sh │ ├── steps-condition-test.yml │ └── workflow-dispatch.yml └── zizmor.yml ├── .licrc ├── .yamlfmt ├── Dockerfile ├── LICENSE ├── README.md ├── awesome-github-actions.md ├── hurl ├── chenrui.dev │ ├── site1.hurl │ ├── site2.hurl │ ├── site3.hurl │ ├── site4.hurl │ └── site5.hurl ├── google │ └── simple.hurl └── twitter │ └── mobile │ └── simple.hurl └── scripts └── repository-dispatch-trigger.sh /.editorconfig: -------------------------------------------------------------------------------- 1 | #editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_trailing_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | workflows: 2 | - changed-files: 3 | - any-glob-to-any-file: '.github/workflows/**/*' 4 | scripts: 5 | - changed-files: 6 | - any-glob-to-any-file: 'scripts/**/*' 7 | homebrew: 8 | - changed-files: 9 | - any-glob-to-any-file: '.github/workflows/brew.yml' 10 | -------------------------------------------------------------------------------- /.github/renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | extends: [ 3 | 'config:recommended', 4 | 'schedule:daily', 5 | ], 6 | commitMessageSuffix: ' in {{packageFile}}', 7 | dependencyDashboard: true, 8 | automerge: true, 9 | automergeStrategy: 'rebase', 10 | baseBranches: [ 11 | 'main', 12 | '/^release-.*/', 13 | ], 14 | platformAutomerge: true, 15 | labels: [ 16 | 'dependencies', 17 | ], 18 | vulnerabilityAlerts: { 19 | enabled: true, 20 | labels: [ 21 | 'security', 22 | ], 23 | }, 24 | customManagers: [ 25 | { 26 | customType: 'regex', 27 | fileMatch: [ 28 | '(^|/)Dockerfile$', 29 | '(^|/)Dockerfile\\.[^/]*$', 30 | ], 31 | matchStrings: [ 32 | 'renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\sENV .*?_VERSION=(?.*)\\s', 33 | ], 34 | versioningTemplate: '{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}', 35 | extractVersionTemplate: '^v(?\\d+\\.\\d+\\.\\d+)', 36 | }, 37 | { 38 | customType: 'regex', 39 | fileMatch: [ 40 | '(^|/)\\.github/workflows/[^/]+\\.ya?ml$', 41 | ], 42 | matchStrings: [ 43 | '# renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\s+?[\\w\\s-]*?version: (?.*)\\s', 44 | '# renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\s+?[\\w\\s]*?_VERSION: (?.*)\\s', 45 | ], 46 | }, 47 | ], 48 | } 49 | -------------------------------------------------------------------------------- /.github/workflows/archive-page.yml: -------------------------------------------------------------------------------- 1 | name: archive-page 2 | 3 | on: 4 | schedule: 5 | # run daily 6 | - cron: '0 0 * * *' 7 | workflow_dispatch: 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | archive: 14 | runs-on: ubuntu-24.04 15 | steps: 16 | - name: Archive page 17 | run: | 18 | curl -L 'https://web.archive.org/save/https://repology.org/tools/trending' \ 19 | -H 'authority: web.archive.org' \ 20 | -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \ 21 | -H 'accept-language: en-US,en' \ 22 | -H 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' \ 23 | -H 'sec-ch-ua-mobile: ?0' \ 24 | -H 'sec-ch-ua-platform: "macOS"' \ 25 | -H 'sec-fetch-dest: document' \ 26 | -H 'sec-fetch-mode: navigate' \ 27 | -H 'sec-fetch-site: none' \ 28 | -H 'sec-fetch-user: ?1' \ 29 | -H 'upgrade-insecure-requests: 1' \ 30 | -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' 31 | -------------------------------------------------------------------------------- /.github/workflows/brew-debug.yml: -------------------------------------------------------------------------------- 1 | # ref, https://stackoverflow.com/questions/71791532/github-actions-homebrew-install-terraform-version-lags-behind 2 | name: brew-debug 3 | 4 | on: 5 | pull_request: 6 | branches: 7 | - main 8 | 9 | env: 10 | # `test` and `audit` are test dev commands 11 | HOMEBREW_DEVELOPER: 1 12 | HOMEBREW_NO_AUTO_UPDATE: 1 13 | HOMEBREW_NO_ANALYTICS: 1 14 | # https://github.com/Homebrew/homebrew-core/blob/2b267008a1315bae4bceb2efb4a9e503e2d00b62/.github/workflows/tests.yml#L16-L17 15 | HOMEBREW_NO_BUILD_ERROR_ISSUES: 1 16 | HOMEBREW_ARM64_TESTING: 1 17 | # save some time 18 | HOMEBREW_NO_INSTALL_CLEANUP: 1 19 | # no need to upgrade dependants 20 | HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 21 | # https://github.com/Homebrew/homebrew-test-bot/pull/868 22 | HOMEBREW_NO_INSTALL_FROM_API: 1 23 | 24 | permissions: 25 | contents: read 26 | 27 | # three jobs in this workflow: 28 | # 1. debug formula on macos (runs on PR only) 29 | # 2. debug formula on ubuntu (runs on PR only) 30 | jobs: 31 | dummy-job: 32 | runs-on: ubuntu-24.04 33 | steps: 34 | - run: echo "dummy job" 35 | 36 | # # debug formula run on arm macos 37 | # formula-debug-macos: 38 | # runs-on: macos-14 # macos-14 is arm runner 39 | # if: github.event_name == 'pull_request' 40 | # defaults: 41 | # run: 42 | # # simplify the debugging flow 43 | # # https://docs.brew.sh/FAQ#why-should-i-install-homebrew-in-the-default-location 44 | # working-directory: /opt/homebrew/Library/Taps/homebrew/homebrew-core 45 | # steps: 46 | # - run: brew update 47 | # - name: Setup tmate session 48 | # uses: mxschmitt/action-tmate@v3 49 | 50 | # # debug formula run on intel macos 51 | # formula-debug-macos: 52 | # runs-on: macos-13 # macos-14 is arm runner 53 | # if: github.event_name == 'pull_request' 54 | # defaults: 55 | # run: 56 | # # simplify the debugging flow 57 | # # https://docs.brew.sh/FAQ#why-should-i-install-homebrew-in-the-default-location 58 | # working-directory: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core 59 | # steps: 60 | # - run: brew update 61 | # - name: Setup tmate session 62 | # uses: mxschmitt/action-tmate@v3 63 | 64 | # # debug formula on ubuntu 65 | # formula-debug-ubuntu: 66 | # runs-on: ubuntu-22.04 67 | # if: github.event_name == 'pull_request' 68 | # defaults: 69 | # run: 70 | # # simplify the debugging flow 71 | # # https://docs.brew.sh/FAQ#why-should-i-install-homebrew-in-the-default-location 72 | # working-directory: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core 73 | # steps: 74 | # # As brew got removed from the ubuntu images, we need to install it 75 | # # https://github.com/actions/runner-images/issues/6283 76 | # - name: Set up Homebrew 77 | # id: set-up-homebrew 78 | # # https://github.com/Homebrew/actions/tree/master/setup-homebrew 79 | # uses: Homebrew/actions/setup-homebrew@bc738ca370c95ed8d8b44c9b5fcba16e54f5218a 80 | 81 | # - name: Setup tmate session 82 | # uses: mxschmitt/action-tmate@v3 83 | 84 | # # debug formula on ubuntu arm 85 | # formula-debug-ubuntu-arm: 86 | # runs-on: ubuntu-22.04-arm 87 | # if: github.event_name == 'pull_request' 88 | # defaults: 89 | # run: 90 | # # simplify the debugging flow 91 | # # https://docs.brew.sh/FAQ#why-should-i-install-homebrew-in-the-default-location 92 | # working-directory: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core 93 | # steps: 94 | # - uses: actions/checkout@v4 95 | # - name: Setup Homebrew 96 | # run: | 97 | # .github/workflows/scripts/install_homebrew.sh 98 | 99 | # - name: Setup tmate session 100 | # uses: mxschmitt/action-tmate@v3 101 | -------------------------------------------------------------------------------- /.github/workflows/brew-regression-build.yml: -------------------------------------------------------------------------------- 1 | # ref, https://stackoverflow.com/questions/71791532/github-actions-homebrew-install-terraform-version-lags-behind 2 | name: brew-regression-build 3 | 4 | # ref, https://github.blog/changelog/2022-09-26-github-actions-dynamic-names-for-workflow-runs/ 5 | run-name: regression build "${{inputs.formula}}" 6 | 7 | on: 8 | workflow_dispatch: 9 | inputs: 10 | formula: 11 | description: Formula name 12 | required: true 13 | 14 | env: 15 | # `test` and `audit` are test dev commands 16 | HOMEBREW_DEVELOPER: 1 17 | HOMEBREW_NO_AUTO_UPDATE: 1 18 | HOMEBREW_NO_ANALYTICS: 1 19 | # https://github.com/Homebrew/homebrew-core/blob/2b267008a1315bae4bceb2efb4a9e503e2d00b62/.github/workflows/tests.yml#L16-L17 20 | HOMEBREW_NO_BUILD_ERROR_ISSUES: 1 21 | HOMEBREW_ARM64_TESTING: 1 22 | # save some time 23 | HOMEBREW_NO_INSTALL_CLEANUP: 1 24 | # no need to upgrade dependants 25 | HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 26 | # https://github.com/Homebrew/homebrew-test-bot/pull/868 27 | HOMEBREW_NO_INSTALL_FROM_API: 1 28 | 29 | permissions: 30 | contents: read 31 | 32 | jobs: 33 | macos-build: 34 | name: ${{ matrix.os }} build 35 | runs-on: ${{ matrix.os }} 36 | strategy: 37 | fail-fast: false 38 | matrix: 39 | os: 40 | - macos-13 41 | - macos-14 42 | - macos-15 43 | steps: 44 | - run: brew update 45 | - run: brew install -s "${{inputs.formula}}" && brew test "${{inputs.formula}}" 46 | - run: brew linkage --cached "${{inputs.formula}}" 47 | 48 | linux-build: 49 | name: ubuntu-24.04 build 50 | runs-on: ubuntu-24.04 51 | steps: 52 | - name: Set up Homebrew 53 | id: set-up-homebrew 54 | # https://github.com/Homebrew/actions/tree/master/setup-homebrew 55 | uses: Homebrew/actions/setup-homebrew@dc1a15f6b9824540f943d8d9536b1ea111417553 56 | - run: brew update 57 | - run: brew install -s "${{inputs.formula}}" && brew test "${{inputs.formula}}" 58 | - run: brew linkage --cached "${{inputs.formula}}" 59 | -------------------------------------------------------------------------------- /.github/workflows/brew-regression.yml: -------------------------------------------------------------------------------- 1 | # ref, https://stackoverflow.com/questions/71791532/github-actions-homebrew-install-terraform-version-lags-behind 2 | name: brew-regression 3 | 4 | # ref, https://github.blog/changelog/2022-09-26-github-actions-dynamic-names-for-workflow-runs/ 5 | run-name: regression test "${{inputs.formula}}" 6 | 7 | on: 8 | workflow_dispatch: 9 | inputs: 10 | formula: 11 | description: Formula name 12 | required: true 13 | 14 | env: 15 | # `test` and `audit` are test dev commands 16 | HOMEBREW_DEVELOPER: 1 17 | HOMEBREW_NO_AUTO_UPDATE: 1 18 | HOMEBREW_NO_ANALYTICS: 1 19 | # https://github.com/Homebrew/homebrew-core/blob/2b267008a1315bae4bceb2efb4a9e503e2d00b62/.github/workflows/tests.yml#L16-L17 20 | HOMEBREW_NO_BUILD_ERROR_ISSUES: 1 21 | HOMEBREW_ARM64_TESTING: 1 22 | # save some time 23 | HOMEBREW_NO_INSTALL_CLEANUP: 1 24 | # no need to upgrade dependants 25 | HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 26 | # https://github.com/Homebrew/homebrew-test-bot/pull/868 27 | HOMEBREW_NO_INSTALL_FROM_API: 1 28 | 29 | permissions: 30 | contents: read 31 | 32 | jobs: 33 | macos-build: 34 | name: ${{ matrix.os }} test 35 | runs-on: ${{ matrix.os }} 36 | strategy: 37 | fail-fast: false 38 | matrix: 39 | os: 40 | - macos-13 41 | - macos-14 42 | - macos-15 43 | steps: 44 | - run: brew update 45 | - run: brew install "${{inputs.formula}}" && brew test "${{inputs.formula}}" 46 | - run: brew linkage --cached "${{inputs.formula}}" 47 | 48 | linux-build: 49 | name: ubuntu-24.04 test 50 | runs-on: ubuntu-24.04 51 | steps: 52 | - name: Set up Homebrew 53 | id: set-up-homebrew 54 | # https://github.com/Homebrew/actions/tree/master/setup-homebrew 55 | uses: Homebrew/actions/setup-homebrew@dc1a15f6b9824540f943d8d9536b1ea111417553 56 | - run: brew update 57 | - run: brew install "${{inputs.formula}}" && brew test "${{inputs.formula}}" 58 | - run: brew linkage --cached "${{inputs.formula}}" 59 | -------------------------------------------------------------------------------- /.github/workflows/chenrui-dev.yml: -------------------------------------------------------------------------------- 1 | name: chenrui.dev site check 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '*/1 * * * *' 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | site-check: 13 | runs-on: ubuntu-24.04 14 | steps: 15 | - name: test site 16 | run: wget https://chenrui.dev 17 | continue-on-error: true 18 | 19 | - name: test site 20 | run: wget https://chenrui.dev 21 | continue-on-error: true 22 | 23 | - name: test site 24 | run: wget https://chenrui.dev 25 | continue-on-error: true 26 | -------------------------------------------------------------------------------- /.github/workflows/compress-images.yml: -------------------------------------------------------------------------------- 1 | # ref, https://github.com/marketplace/actions/image-actions 2 | name: compress-images 3 | 4 | on: 5 | pull_request: 6 | paths: 7 | - '**.jpg' 8 | - '**.jpeg' 9 | - '**.png' 10 | - '**.webp' 11 | 12 | permissions: 13 | contents: read 14 | 15 | jobs: 16 | build: 17 | name: calibreapp/image-actions 18 | runs-on: ubuntu-24.04 19 | steps: 20 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 21 | with: 22 | persist-credentials: false 23 | 24 | - name: Compress Images 25 | uses: calibreapp/image-actions@main 26 | with: 27 | githubToken: ${{ secrets.GITHUB_TOKEN }} 28 | ignorePaths: 'node_modules/**,**/*_optimized.jpg,**/*_optimized.jpeg,**/*_optimized.png,**/*_optimized.webp' 29 | jpegQuality: '80' 30 | jpegProgressive: false 31 | pngQuality: '100' 32 | webpQuality: '80' 33 | -------------------------------------------------------------------------------- /.github/workflows/credentials.yml: -------------------------------------------------------------------------------- 1 | name: aws credentials flow 2 | 3 | # only trigger on demand 4 | on: workflow_dispatch 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-24.04 12 | steps: 13 | - name: Setup tmate session 14 | uses: mxschmitt/action-tmate@7b6a61a73bbb9793cb80ad69b8dd8ac19261834c # v3 15 | - name: Write into file 16 | id: write_file 17 | uses: timheuer/base64-to-file@adaa40c0c581f276132199d4cf60afa07ce60eac # v1.2 18 | with: 19 | fileName: 'myTemporaryFile.txt' 20 | encodedString: ${{ secrets.AWS_CREDENTIALS_FILE_BASE64 }} 21 | 22 | - name: Use the output 23 | run: | 24 | ls ${{ steps.write_file.outputs.filePath }} 25 | cat ${{ steps.write_file.outputs.filePath }} 26 | -------------------------------------------------------------------------------- /.github/workflows/delete-event.yml: -------------------------------------------------------------------------------- 1 | name: delete-event 2 | 3 | # Runs your workflow anytime someone deletes a `branch` or `tag`, which triggers the `delete` event. 4 | on: 5 | delete 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-24.04 13 | steps: 14 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 15 | with: 16 | persist-credentials: false 17 | 18 | - name: run build 19 | run: | 20 | echo "GITHUB_SHA is ${{ github.sha }}" 21 | echo "GITHUB_REF is ${{ github.ref }}" 22 | echo "${{ github.event.ref }} - ${{ github.event.ref_type }}" 23 | -------------------------------------------------------------------------------- /.github/workflows/display-github-context.yml: -------------------------------------------------------------------------------- 1 | name: display-github-context 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/workflows/display-github-context.yml' 7 | 8 | jobs: 9 | all_jobs: 10 | strategy: 11 | matrix: 12 | os: 13 | # Linux & macOS 14 | - ubuntu-22.04 15 | - ubuntu-22.04-arm 16 | - ubuntu-24.04 17 | - ubuntu-24.04-arm 18 | - macos-13 19 | - macos-14 20 | - macos-15 21 | # custom large runners, e.g.: 22 | # - macos-14-large (intel) 23 | # - macos-14-xlarge (arm) 24 | 25 | # Windows 26 | - windows-2019 27 | - windows-2022 28 | 29 | runs-on: ${{ matrix.os }} 30 | permissions: 31 | contents: read 32 | pull-requests: write # for actions/github-script 33 | steps: 34 | - name: Show runner info (Linux/macOS) 35 | if: startsWith(matrix.os, 'ubuntu-') || startsWith(matrix.os, 'macos-') 36 | shell: bash 37 | run: | 38 | echo "RUNNER_OS: $RUNNER_OS" 39 | echo "RUNNER_ARCH: $RUNNER_ARCH" 40 | echo "GITHUB_CONTEXT: ${{ toJSON(github) }}" 41 | 42 | - name: Show runner info (Windows) 43 | if: startsWith(matrix.os, 'windows-') 44 | shell: pwsh 45 | run: | 46 | echo "RUNNER_OS: $env:RUNNER_OS" 47 | echo "RUNNER_ARCH: $env:RUNNER_ARCH" 48 | echo 'GITHUB_CONTEXT is "${{ toJSON(github) }}"' 49 | 50 | - name: Post runner info as PR comment 51 | if: ${{ github.event_name == 'pull_request' }} 52 | uses: actions/github-script@v7 53 | with: 54 | github-token: ${{ secrets.GITHUB_TOKEN }} 55 | script: | 56 | // Only post a comment if we have a PR, otherwise skip 57 | if (!context.payload.pull_request) { 58 | console.log('Not a PR, skipping comment creation.'); 59 | return; 60 | } 61 | 62 | const body = [ 63 | `**Runner OS**: ${process.env.RUNNER_OS}`, 64 | `**Runner Arch**: ${process.env.RUNNER_ARCH}`, 65 | '', 66 | '
', 67 | 'See full GitHub context', 68 | '', 69 | '```json', 70 | JSON.stringify(context, null, 2), 71 | '```', 72 | '
', 73 | ].join('\n'); 74 | 75 | await github.rest.issues.createComment({ 76 | issue_number: context.payload.pull_request.number, 77 | owner: context.repo.owner, 78 | repo: context.repo.repo, 79 | body 80 | }); 81 | -------------------------------------------------------------------------------- /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: docker 2 | 3 | on: push 4 | 5 | jobs: 6 | docker: 7 | runs-on: ubuntu-24.04 8 | steps: 9 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 10 | with: 11 | persist-credentials: false 12 | 13 | - name: Set up QEMU 14 | uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3 15 | with: 16 | image: tonistiigi/binfmt:latest 17 | platforms: arm64,arm 18 | 19 | - name: Set up Docker Buildx 20 | uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3 21 | with: 22 | cache-binary: false 23 | 24 | - name: Login to DockerHub 25 | uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 26 | with: 27 | username: 'chenrui' 28 | password: ${{ secrets.DOCKERHUB_TOKEN }} 29 | 30 | - name: Login to GitHub Container Registry 31 | uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 32 | with: 33 | registry: ghcr.io 34 | username: ${{ github.repository_owner }} 35 | password: ${{ secrets.GH_REGISTRY_TOKEN }} 36 | 37 | - name: Build and push 38 | uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 39 | with: 40 | context: . 41 | platforms: linux/amd64,linux/arm64,linux/arm/v7 42 | push: true 43 | tags: | 44 | chenrui/github-action-test:latest 45 | chenrui/github-action-test:${{ github.sha }} 46 | ghcr.io/chenrui333/github-action-test:latest 47 | ghcr.io/chenrui333/github-action-test:${{ github.sha }} 48 | -------------------------------------------------------------------------------- /.github/workflows/hurl.yml: -------------------------------------------------------------------------------- 1 | name: hurl 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - hurl/** 9 | - .github/workflows/hurl.yml 10 | workflow_dispatch: 11 | schedule: 12 | # run every 5 mins 13 | - cron: "*/5 * * * *" 14 | 15 | permissions: 16 | contents: read 17 | 18 | jobs: 19 | hurl: 20 | runs-on: ubuntu-24.04 21 | steps: 22 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 23 | with: 24 | persist-credentials: false 25 | 26 | - name: Install hurl 27 | run: | 28 | cd /tmp && curl -fsSL https://github.com/Orange-OpenSource/hurl/releases/download/$HURL_VERSION/hurl-$HURL_VERSION-x86_64-unknown-linux-gnu.tar.gz -o hurl.tar.gz 29 | sudo tar xzf hurl.tar.gz -C /usr/local/bin --strip-components=2 hurl-$HURL_VERSION-x86_64-unknown-linux-gnu/bin 30 | hurl --version 31 | env: 32 | # renovate: datasource=github-releases depName=Orange-OpenSource/hurl 33 | HURL_VERSION: 6.1.1 34 | 35 | - name: Run tests 36 | run: hurl --retry 5 --test --glob "hurl/chenrui.dev/*.hurl" 37 | continue-on-error: true 38 | 39 | - name: Run tests 40 | run: hurl --retry 5 --test --glob "hurl/chenrui.dev/*.hurl" 41 | continue-on-error: true 42 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Pull Request Labeler" 2 | 3 | on: [pull_request] 4 | 5 | jobs: 6 | label: 7 | runs-on: ubuntu-24.04 8 | permissions: 9 | contents: read 10 | pull-requests: write 11 | steps: 12 | - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5 13 | with: 14 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 15 | -------------------------------------------------------------------------------- /.github/workflows/lang-go.yml: -------------------------------------------------------------------------------- 1 | name: lang-go 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - main 8 | paths: 9 | - '.github/workflows/lang-go.yml' 10 | 11 | permissions: 12 | contents: read 13 | 14 | jobs: 15 | show-go-version: 16 | name: Show Go ${{ matrix.go }} 17 | runs-on: ubuntu-latest 18 | strategy: 19 | fail-fast: false 20 | matrix: 21 | go: 22 | - '1.22' 23 | - '1.23' 24 | - '1.24.0-rc.1' # see discussions in https://github.com/actions/setup-go/issues/524 25 | 26 | steps: 27 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 28 | with: 29 | persist-credentials: false 30 | 31 | - name: Set up Go 32 | uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 33 | with: 34 | go-version: ${{ matrix.go }} 35 | 36 | - name: Display Go Version 37 | run: go version 38 | -------------------------------------------------------------------------------- /.github/workflows/lang-java.yml: -------------------------------------------------------------------------------- 1 | # Test workflow to inspect and display the Java versions installed on GitHub-hosted runners. 2 | 3 | name: lang-java 4 | 5 | on: 6 | workflow_dispatch: 7 | push: 8 | branches: 9 | - main 10 | paths: 11 | - '.github/workflows/lang-java.yml' 12 | 13 | permissions: 14 | contents: read 15 | 16 | jobs: 17 | show-java-version: 18 | name: Show JDK ${{ matrix.java }}, ${{ matrix.os }} 19 | runs-on: ${{ matrix.os }} 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | java: [8, 11, 17, 21, 23, 24-ea] 24 | os: [ubuntu-latest, macos-13, macos-latest] 25 | 26 | steps: 27 | - name: Set up JDK 28 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4 29 | with: 30 | java-version: ${{ matrix.java }} 31 | distribution: 'zulu' 32 | 33 | - name: Display Java Version 34 | shell: bash 35 | run: | 36 | if [[ "${{ matrix.java }}" == "8" ]]; then 37 | java -version 38 | else 39 | java --version 40 | fi 41 | -------------------------------------------------------------------------------- /.github/workflows/link-checker.yml: -------------------------------------------------------------------------------- 1 | name: link-checker 2 | 3 | on: push 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | check: 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 13 | with: 14 | persist-credentials: false 15 | 16 | - name: Link Checker 17 | uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2 18 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: docker 2 | 3 | on: 4 | release: 5 | types: 6 | - "published" 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-24.04 14 | steps: 15 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 16 | with: 17 | persist-credentials: false 18 | 19 | # Publish release to container registry 20 | - name: populate release version 21 | if: ${{ github.event_name == 'release'}} 22 | run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV 23 | - name: build docker-test:$RELEASE_VERSION release image 24 | if: ${{ github.event_name == 'release'}} 25 | run: | 26 | docker build -t chenrui333/docker-test:$RELEASE_VERSION . 27 | -------------------------------------------------------------------------------- /.github/workflows/repository-dispatch.yml: -------------------------------------------------------------------------------- 1 | name: repository-dispatch 2 | 3 | on: 4 | repository_dispatch: 5 | types: ["trigger-event"] 6 | 7 | # how to test this workflow 8 | # GITHUB_TOKEN=xxx ./scripts/repository-dispatch-trigger.sh 9 | 10 | # run log result 11 | # https://github.com/chenrui333/github-action-test/actions/runs/161112535 12 | 13 | env: 14 | ID: ${{ github.event.client_payload.id }} 15 | 16 | permissions: 17 | contents: read 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-24.04 22 | steps: 23 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 24 | with: 25 | persist-credentials: false 26 | 27 | - name: show context 28 | run: | 29 | echo "github sha is ${{ github.sha }}" 30 | echo "github.event is ${{ toJson(github.event) }}" 31 | echo "github.event_name is ${{ github.event_name }}" 32 | - name: run build 33 | if: github.event_name == 'repository_dispatch' 34 | run: | 35 | echo "id is $ID" 36 | echo "integration is ${{ github.event.client_payload.integration }}" 37 | 38 | show-id: 39 | runs-on: ubuntu-24.04 40 | needs: [build] 41 | steps: 42 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 43 | with: 44 | persist-credentials: false 45 | 46 | - name: show id 47 | run: | 48 | echo "id is $ID" 49 | -------------------------------------------------------------------------------- /.github/workflows/scripts/install_homebrew.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | echo "Updating package list and installing build-essential..." 5 | sudo apt-get update && sudo apt-get install -y build-essential 6 | 7 | echo "Installing git and curl..." 8 | sudo apt-get install -y git curl 9 | 10 | echo "Creating Homebrew directory in /home/linuxbrew/.linuxbrew..." 11 | sudo mkdir -p /home/linuxbrew/.linuxbrew 12 | # Ensure the current user owns this directory so that brew can write to it 13 | sudo chown -R $USER: /home/linuxbrew/.linuxbrew 14 | 15 | echo "Cloning the Homebrew repository..." 16 | git clone https://github.com/Homebrew/brew /home/linuxbrew/.linuxbrew/Homebrew 17 | 18 | echo "Creating bin directory for Homebrew..." 19 | sudo mkdir -p /home/linuxbrew/.linuxbrew/bin 20 | sudo chown -R $USER: /home/linuxbrew/.linuxbrew/bin 21 | 22 | echo "Linking the brew executable..." 23 | ln -s /home/linuxbrew/.linuxbrew/Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/brew 24 | 25 | # Export environment variables so that brew uses the expected prefix 26 | export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" 27 | export PATH="$HOMEBREW_PREFIX/bin:$PATH" 28 | export MANPATH="$HOMEBREW_PREFIX/share/man:$MANPATH" 29 | export INFOPATH="$HOMEBREW_PREFIX/share/info:$INFOPATH" 30 | 31 | echo "Updating Homebrew..." 32 | brew update 33 | 34 | echo "Checking Homebrew version..." 35 | brew --version 36 | 37 | echo "Tapping homebrew/core..." 38 | brew tap homebrew/core 39 | 40 | echo "Homebrew installation and initial setup complete." 41 | -------------------------------------------------------------------------------- /.github/workflows/steps-condition-test.yml: -------------------------------------------------------------------------------- 1 | name: steps-condition-test 2 | 3 | on: push 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | test: 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 13 | with: 14 | persist-credentials: false 15 | 16 | - name: Check diff 17 | id: verify_diff 18 | run: | 19 | git diff --quiet README.md || echo "::set-output name=new_change::true" 20 | 21 | - name: Commit files 22 | if: steps.verify_diff.outputs.new_change == 'true' 23 | run: | 24 | git config --local user.email "action@github.com" 25 | git config --local user.name "GitHub Action" 26 | echo "steps-condition-test" >> README.md 27 | git add README.md 28 | git commit -m "BOT: steps-condition-test" 29 | git push 30 | - run: echo "do something else" 31 | -------------------------------------------------------------------------------- /.github/workflows/workflow-dispatch.yml: -------------------------------------------------------------------------------- 1 | name: workflow-dispatch 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | time_window: 7 | description: 'Job Time Range' 8 | required: true 9 | default: '--twoDayWindow' 10 | manual: 11 | description: 'Set this if you are running the job manually.' 12 | default: false 13 | 14 | permissions: 15 | contents: read 16 | 17 | jobs: 18 | build: 19 | runs-on: ubuntu-24.04 20 | steps: 21 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 22 | with: 23 | persist-credentials: false 24 | 25 | - run: | 26 | echo "Job time range arg: ${{ github.event.inputs.time_window }}" 27 | echo "Job run manually?: ${{ github.event.inputs.manual }}" 28 | -------------------------------------------------------------------------------- /.github/zizmor.yml: -------------------------------------------------------------------------------- 1 | rules: 2 | template-injection: 3 | ignore: 4 | - brew-regression-build.yml:42 5 | - brew-regression-build.yml:43 6 | - brew-regression-build.yml:54 7 | - brew-regression-build.yml:55 8 | - brew-regression.yml:42 9 | - brew-regression.yml:43 10 | - brew-regression.yml:54 11 | - brew-regression.yml:55 12 | - credentials.yml:22 13 | - delete-event.yml:18 14 | - display-github-context.yml:34 15 | - display-github-context.yml:42 16 | - repository-dispatch.yml:27 17 | - repository-dispatch.yml:32 18 | - workflow-dispatch.yml:25 19 | -------------------------------------------------------------------------------- /.licrc: -------------------------------------------------------------------------------- 1 | [licenses] 2 | # This indicates which are the only licenses that Licensebat will accept. 3 | # The rest will be flagged as not allowed. 4 | accepted = [ 5 | "MIT", 6 | "BSD", 7 | "0BSD", 8 | "BSD-2-Clause", 9 | "BSD-3-Clause", 10 | "Apache-2.0", 11 | "CC-BY-3.0", 12 | "CC-BY-4.0", 13 | "CC0-1.0", 14 | "ISC" 15 | ] 16 | 17 | # This will indicate which licenses are not accepted. 18 | # The rest will be accepted, except for the unknown licenses or dependencies without licenses. 19 | # unaccepted = ["LGPL"] 20 | # Note that only one of the previous options can be enabled at once. 21 | # If both of them are informed, only accepted will be considered. 22 | 23 | [dependencies] 24 | # This will allow users to flag some dependencies so that Licensebat will not check for their license. 25 | ignored = [] 26 | # If set to true, Licensebat will ignore the dev dependencies. 27 | ignore_dev_dependencies = true 28 | # If set to true, Licensebat will ignore the optional dependencies. 29 | ignore_optional_dependencies = true 30 | 31 | [behavior] 32 | # False by default, if true, it will only run the checks when one of the dependency files or the .licrc file has been modified. 33 | run_only_on_dependency_modification = true 34 | # False by default, if true, it will never block the build. 35 | do_not_block_pr = true 36 | -------------------------------------------------------------------------------- /.yamlfmt: -------------------------------------------------------------------------------- 1 | doublestar: true 2 | include: 3 | - "./**/*.{yaml,yml}" 4 | exclude: 5 | - ".github/workflows/**" 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.24@sha256:d1db785fb37feb87d9140d78ed4fb7c75ee787360366a9c5efe39c7a841a0277 2 | 3 | # https://packages.debian.org/stable/upzip 4 | # renovate: release=stable depName=unzip 5 | ARG UNZIP_VERSION=6.0-28 6 | RUN apt-get update && \ 7 | apt-get install -y unzip=${UNZIP_VERSION} 8 | 9 | # Install Terraform 10 | # renovate: datasource=github-releases depName=hashicorp/terraform versioning=hashicorp 11 | ARG TERRAFORM_VERSION=1.11.1 12 | RUN case $(uname -m) in x86_64|amd64) ARCH="amd64" ;; aarch64|arm64|armv7l) ARCH="arm64" ;; esac && \ 13 | wget -nv -O terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${ARCH}.zip && \ 14 | mkdir -p /usr/local/bin/tf/versions/${TERRAFORM_VERSION} && \ 15 | unzip terraform.zip -d /usr/local/bin/tf/versions/${TERRAFORM_VERSION} && \ 16 | ln -s /usr/local/bin/tf/versions/${TERRAFORM_VERSION}/terraform /usr/local/bin/terraform && \ 17 | rm terraform.zip 18 | 19 | # Install conftest 20 | # renovate: datasource=github-releases depName=open-policy-agent/conftest 21 | ARG CONFTEST_VERSION=0.58.0 22 | RUN case $(uname -m) in x86_64|amd64) ARCH="x86_64" ;; aarch64|arm64|armv7l) ARCH="arm64" ;; esac && \ 23 | curl -LOs https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_Linux_${ARCH}.tar.gz && \ 24 | curl -LOs https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/checksums.txt && \ 25 | sed -n "/conftest_${CONFTEST_VERSION}_Linux_${ARCH}.tar.gz/p" checksums.txt | sha256sum -c && \ 26 | mkdir -p /usr/local/bin/cft/versions/${CONFTEST_VERSION} && \ 27 | tar -C /usr/local/bin/cft/versions/${CONFTEST_VERSION} -xzf conftest_${CONFTEST_VERSION}_Linux_${ARCH}.tar.gz && \ 28 | ln -s /usr/local/bin/cft/versions/${CONFTEST_VERSION}/conftest /usr/local/bin/conftest${CONFTEST_VERSION} && \ 29 | rm conftest_${CONFTEST_VERSION}_Linux_${ARCH}.tar.gz && \ 30 | rm checksums.txt 31 | 32 | RUN go install golang.org/x/tools/cmd/goimports@latest 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Rui Chen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # github action test 2 | -------------------------------------------------------------------------------- /awesome-github-actions.md: -------------------------------------------------------------------------------- 1 | # awesome-github-actions 2 | 3 | - [calibreapp/image-actions](https://github.com/calibreapp/image-actions), image compression 4 | - [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action), link checker 5 | - [crate-ci/typos](https://github.com/crate-ci/typos), typos 6 | - [tmcw/notfoundbot](https://github.com/tmcw/notfoundbot), fix outbound links 7 | - [softprops/diffset](https://github.com/softprops/diffset), diff list btw branches 8 | - [softprops/turnstyle](https://github.com/softprops/turnstyle), serializing workflow runs (before `concurrency`) 9 | - [softprops/action-gh-release](https://github.com/softprops/action-gh-release), create GitHub releases 10 | -------------------------------------------------------------------------------- /hurl/chenrui.dev/site1.hurl: -------------------------------------------------------------------------------- 1 | GET https://chenrui.dev 2 | User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 3 | Cache-Control: no-cache, no-store, must-revalidate 4 | Pragma: no-cache 5 | Expires: 0 6 | DNT: 1 7 | Connection: close 8 | Accept-Encoding: identity 9 | 10 | [Options] 11 | location: true 12 | 13 | HTTP/2 200 14 | cache-control: max-age=0, private, must-revalidate 15 | 16 | [Asserts] 17 | header "vary" == "X-Requested-With, X-PJAX-Container, Turbo-Frame, Turbo-Visit, Accept-Encoding, Accept, X-Requested-With" 18 | header "etag" exists 19 | header "x-github-request-id" exists 20 | cookie "_gh_sess" exists 21 | cookie "_octo" exists 22 | cookie "logged_in" == "no" 23 | -------------------------------------------------------------------------------- /hurl/chenrui.dev/site2.hurl: -------------------------------------------------------------------------------- 1 | GET https://chenrui.dev 2 | User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 3 | Cache-Control: no-cache, no-store, must-revalidate 4 | Pragma: no-cache 5 | Expires: 0 6 | DNT: 1 7 | Connection: close 8 | Accept-Encoding: identity 9 | 10 | [Options] 11 | location: true 12 | 13 | HTTP/2 200 14 | cache-control: max-age=0, private, must-revalidate 15 | 16 | [Asserts] 17 | header "vary" == "X-Requested-With, X-PJAX-Container, Turbo-Frame, Turbo-Visit, Accept-Encoding, Accept, X-Requested-With" 18 | header "etag" exists 19 | header "x-github-request-id" exists 20 | cookie "_gh_sess" exists 21 | cookie "_octo" exists 22 | cookie "logged_in" == "no" 23 | -------------------------------------------------------------------------------- /hurl/chenrui.dev/site3.hurl: -------------------------------------------------------------------------------- 1 | GET https://chenrui.dev 2 | User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 3 | Cache-Control: no-cache, no-store, must-revalidate 4 | Pragma: no-cache 5 | Expires: 0 6 | DNT: 1 7 | Connection: close 8 | Accept-Encoding: identity 9 | 10 | [Options] 11 | location: true 12 | 13 | HTTP/2 200 14 | cache-control: max-age=0, private, must-revalidate 15 | 16 | [Asserts] 17 | header "vary" == "X-Requested-With, X-PJAX-Container, Turbo-Frame, Turbo-Visit, Accept-Encoding, Accept, X-Requested-With" 18 | header "etag" exists 19 | header "x-github-request-id" exists 20 | cookie "_gh_sess" exists 21 | cookie "_octo" exists 22 | cookie "logged_in" == "no" 23 | -------------------------------------------------------------------------------- /hurl/chenrui.dev/site4.hurl: -------------------------------------------------------------------------------- 1 | GET https://chenrui.dev 2 | User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/120.0.6099.119 Mobile/15E148 Safari/604.1 3 | Cache-Control: no-cache, no-store, must-revalidate 4 | Pragma: no-cache 5 | Expires: 0 6 | DNT: 1 7 | Connection: close 8 | Accept-Encoding: identity 9 | 10 | [Options] 11 | location: true 12 | 13 | HTTP/2 200 14 | cache-control: max-age=0, private, must-revalidate 15 | 16 | [Asserts] 17 | header "vary" == "X-Requested-With, X-PJAX-Container, Turbo-Frame, Turbo-Visit, Accept-Encoding, Accept, X-Requested-With" 18 | header "etag" exists 19 | header "x-github-request-id" exists 20 | cookie "_gh_sess" exists 21 | cookie "_octo" exists 22 | cookie "logged_in" == "no" 23 | -------------------------------------------------------------------------------- /hurl/chenrui.dev/site5.hurl: -------------------------------------------------------------------------------- 1 | GET https://chenrui.dev 2 | User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.210 Mobile Safari/537.36 3 | Cache-Control: no-cache, no-store, must-revalidate 4 | Pragma: no-cache 5 | Expires: 0 6 | DNT: 1 7 | Connection: close 8 | Accept-Encoding: identity 9 | 10 | [Options] 11 | location: true 12 | 13 | HTTP/2 200 14 | cache-control: max-age=0, private, must-revalidate 15 | 16 | [Asserts] 17 | header "vary" == "X-Requested-With, X-PJAX-Container, Turbo-Frame, Turbo-Visit, Accept-Encoding, Accept, X-Requested-With" 18 | header "etag" exists 19 | header "x-github-request-id" exists 20 | cookie "_gh_sess" exists 21 | cookie "_octo" exists 22 | cookie "logged_in" == "no" 23 | -------------------------------------------------------------------------------- /hurl/google/simple.hurl: -------------------------------------------------------------------------------- 1 | GET https://google.com 2 | User-Agent: hurl-mup/4.0.0 3 | 4 | HTTP/2 301 5 | Location: https://www.google.com/ 6 | 7 | [Asserts] 8 | header "content-type" == "text/html; charset=UTF-8" 9 | header "cache-control" == "public, max-age=2592000" 10 | header "content-encoding" not exists 11 | header "server" == "gws" 12 | header "alt-svc" == "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" 13 | 14 | GET https://google.com 15 | User-Agent: hurl-mup/4.0.0 16 | 17 | [Options] 18 | location: true 19 | 20 | HTTP/2 200 21 | 22 | [Asserts] 23 | header "content-type" == "text/html; charset=ISO-8859-1" 24 | header "p3p" == "CP=\"This is not a P3P policy! See g.co/p3phelp for more info.\"" 25 | header "cache-control" == "private, max-age=0" 26 | header "expires" exists 27 | header "content-encoding" not exists 28 | header "server" == "gws" 29 | header "alt-svc" == "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" 30 | -------------------------------------------------------------------------------- /hurl/twitter/mobile/simple.hurl: -------------------------------------------------------------------------------- 1 | GET https://mobile.twitter.com 2 | User-Agent: hurl-mup/4.0.0 3 | 4 | [Options] 5 | location: true 6 | HTTP/2 400 7 | 8 | [Asserts] 9 | header "perf" exists 10 | header "expiry" exists 11 | header "pragma" == "no-cache" 12 | header "server" == "cloudflare tsa_b" 13 | header "x-powered-by" == "Express" 14 | header "cache-control" == "no-cache, no-store, must-revalidate, pre-check=0, post-check=0" 15 | header "last-modified" exists 16 | header "x-response-time" exists 17 | header "x-connection-hash" exists 18 | -------------------------------------------------------------------------------- /scripts/repository-dispatch-trigger.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | main() { 6 | local id="962368b5c27b7ec5ecfcb4ed8f8c57adb52a8442" 7 | curl -X POST -u "chenrui333:${GITHUB_TOKEN}" \ 8 | -H "Accept: application/vnd.github.everest-preview+json" \ 9 | -H "Content-Type: application/json" \ 10 | https://api.github.com/repos/chenrui333/github-action-test/dispatches \ 11 | --data "{\"event_type\":\"trigger-event\",\"client_payload\":{\"id\":\"$id\", \"unit\":false,\"integration\":true}}" 12 | } 13 | 14 | main "$@" 15 | --------------------------------------------------------------------------------