├── checkout-workflow.txt ├── pull-request-workflow.txt ├── commit-and-push-workflow.txt ├── git-auto-commit-workflow.txt ├── file.json ├── git-branchs.png ├── useful-github-actions.png ├── horusec-config.json ├── .github ├── workflows │ ├── debug.yml │ ├── auto-assign.yml │ ├── curl.yml │ ├── ghaction-dump-context.yml │ ├── auto-merge.yml │ ├── auto-assign-author.yml │ ├── gitleaks.yml │ ├── auto-approve.yml │ ├── pull-request.yml │ ├── add-label.yml │ ├── release.yml │ ├── repository-dispatch-triggered.yml │ ├── cancel-workflow.yml │ ├── hadolint.yml │ ├── add-reviewers.yml │ ├── replace-token.yml │ ├── ghaction-github-status.yml │ ├── purge-artifacts.yml │ ├── close-pull-request.yml │ ├── create-json.yml │ ├── read-file.yml │ ├── publish-docker.yml │ ├── stale.yml │ ├── first-interaction.yml │ ├── set-secrets.yml │ ├── delete-artifact.yml │ ├── repository-dispatch.yml │ ├── enforce-labels.yml │ ├── auto-accept-collabs.yml │ ├── replace-values-action.yml │ ├── super-linter.yml │ ├── workflow-dispatch-triggerred.yml │ ├── github-script.yml │ ├── manual-approval.yml │ ├── cache.yml │ ├── checkout.yml │ ├── file-existence.yml │ ├── action-cond.yml │ ├── copycat.yml │ ├── app-token.yml │ ├── wait-on-check.yml │ ├── paths-filter.yml │ ├── recreate-release.yml │ ├── compress-image.yml │ ├── changed-files.yml │ ├── gpt-review.yml │ ├── phonito.yml │ ├── typos.yml │ ├── retry-action.yml │ ├── horusec.yml │ ├── commit-and-push.yml │ ├── ghaction-container-scan.yml │ ├── workflow-dispatch.yml │ ├── skip-duplicate.yml │ ├── create-pull-request.yml │ ├── upload-download-artifacts.yml │ ├── get-workflow-origin.yml │ ├── get-workflow-origin-run.yml │ ├── branch-names.yml │ ├── git-auto-commit.yml │ ├── assert-command-line-output.yml │ ├── env-vars.yml │ └── github-environment-variables.yml └── auto_assign.yml ├── Dockerfile ├── assert.txt ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md ├── LICENSE └── README.md /checkout-workflow.txt: -------------------------------------------------------------------------------- 1 | Fri Dec 19 02:02:17 UTC 2025 2 | -------------------------------------------------------------------------------- /pull-request-workflow.txt: -------------------------------------------------------------------------------- 1 | Thu Dec 18 06:40:57 UTC 2025 2 | -------------------------------------------------------------------------------- /commit-and-push-workflow.txt: -------------------------------------------------------------------------------- 1 | Mon Feb 17 13:02:39 UTC 2025 2 | -------------------------------------------------------------------------------- /git-auto-commit-workflow.txt: -------------------------------------------------------------------------------- 1 | Mon Feb 17 13:02:34 UTC 2025 2 | -------------------------------------------------------------------------------- /file.json: -------------------------------------------------------------------------------- 1 | { 2 | "secret_token": "#{SECRET_TOKEN}#", 3 | "apiId": "blabla" 4 | } -------------------------------------------------------------------------------- /git-branchs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillaumeFalourd/useful-actions/HEAD/git-branchs.png -------------------------------------------------------------------------------- /useful-github-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuillaumeFalourd/useful-actions/HEAD/useful-github-actions.png -------------------------------------------------------------------------------- /horusec-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "horusecCliRiskAcceptHashes": ["2c9ed8f3c58de0cc0eb1ce8ac3d5d88f088eccd69938f4136de73600be6538ec"] 3 | } 4 | -------------------------------------------------------------------------------- /.github/workflows/debug.yml: -------------------------------------------------------------------------------- 1 | name: Debug 2 | 3 | on: push 4 | 5 | jobs: 6 | debug: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: hmarr/debug-action@v2 -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.10 2 | 3 | # WORKFLOW TEST 4 | 5 | RUN apk add --no-cache curl==7.66.0-r4 6 | RUN apk add --no-cache bash==5.0.0-r0 7 | RUN apk add --no-cache make==4.2.1-r2 -------------------------------------------------------------------------------- /.github/workflows/auto-assign.yml: -------------------------------------------------------------------------------- 1 | name: 'Auto Assign' 2 | 3 | on: 4 | pull_request: 5 | types: [opened, ready_for_review] 6 | 7 | jobs: 8 | add-reviews: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: kentaro-m/auto-assign-action@v1.2.0 -------------------------------------------------------------------------------- /.github/workflows/curl.yml: -------------------------------------------------------------------------------- 1 | name: Curl 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | curl: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: curl 10 | uses: wei/curl@v1.1.1 11 | with: 12 | args: https://httpbin.org/get -------------------------------------------------------------------------------- /.github/workflows/ghaction-dump-context.yml: -------------------------------------------------------------------------------- 1 | name: Github Action Dump Context 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | dump: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - 12 | name: Dump context 13 | uses: crazy-max/ghaction-dump-context@v1 -------------------------------------------------------------------------------- /.github/workflows/auto-merge.yml: -------------------------------------------------------------------------------- 1 | name: Auto-Merge 2 | 3 | on: pull_request 4 | 5 | jobs: 6 | automerge: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: automerge 10 | uses: "pascalgn/automerge-action@v0.13.1" 11 | env: 12 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" -------------------------------------------------------------------------------- /.github/workflows/auto-assign-author.yml: -------------------------------------------------------------------------------- 1 | name: 'Auto Assign Author' 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, reopened] 6 | 7 | permissions: 8 | pull-requests: write 9 | 10 | jobs: 11 | assign-author: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: toshimaru/auto-author-assign@v1.3.5 -------------------------------------------------------------------------------- /.github/workflows/gitleaks.yml: -------------------------------------------------------------------------------- 1 | name: Gitleaks 2 | 3 | on: [push, pull_request, workflow_dispatch] 4 | 5 | jobs: 6 | gitleaks: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | with: 11 | fetch-depth: '0' 12 | - name: gitleaks-action 13 | uses: zricethezav/gitleaks-action@master -------------------------------------------------------------------------------- /.github/workflows/auto-approve.yml: -------------------------------------------------------------------------------- 1 | name: Auto approve 2 | 3 | on: [pull_request_target] 4 | 5 | jobs: 6 | auto-approve: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: hmarr/auto-approve-action@v2 10 | if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' 11 | with: 12 | github-token: "${{ secrets.GITHUB_TOKEN }}" -------------------------------------------------------------------------------- /.github/workflows/pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | pull-request: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: pull-request 11 | uses: repo-sync/pull-request@v2 12 | with: 13 | destination_branch: "main" 14 | github_token: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/add-label.yml: -------------------------------------------------------------------------------- 1 | name: Add Label 2 | 3 | on: 4 | issues: 5 | types: opened 6 | 7 | jobs: 8 | add_label: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - uses: actions-ecosystem/action-add-labels@v1.1.0 13 | with: 14 | github_token: ${{ secrets.ACCESS_TOKEN }} 15 | labels: documentation 16 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*.*.*' 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | - name: Release 15 | uses: softprops/action-gh-release@v1 16 | env: 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/repository-dispatch-triggered.yml: -------------------------------------------------------------------------------- 1 | name: Repository Dispatch Triggered 2 | 3 | on: [repository_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Repository Dispatch Triggered 10 | if: github.event.action == 'event-demo' 11 | run: | 12 | echo "Workflow triggered successfully by repository dispatch action!" -------------------------------------------------------------------------------- /.github/workflows/cancel-workflow.yml: -------------------------------------------------------------------------------- 1 | name: Cancel Workflow 2 | 3 | on: [push] 4 | 5 | jobs: 6 | cancel: 7 | name: 'Cancel Previous Runs' 8 | runs-on: ubuntu-latest 9 | timeout-minutes: 3 10 | steps: 11 | - name: Cancel Previous Runs 12 | uses: styfle/cancel-workflow-action@0.9.1 13 | with: 14 | workflow_id: 'checkout.yml' 15 | access_token: ${{ github.token }} -------------------------------------------------------------------------------- /.github/workflows/hadolint.yml: -------------------------------------------------------------------------------- 1 | name: Hadolint 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | hadolint: 7 | name: hadolint 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@master 11 | - name: hadolint 12 | uses: burdzwastaken/hadolint-action@master 13 | env: 14 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 15 | HADOLINT_ACTION_DOCKERFILE_FOLDER: . -------------------------------------------------------------------------------- /.github/workflows/add-reviewers.yml: -------------------------------------------------------------------------------- 1 | name: Add Reviewers 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Add Reviewers 11 | uses: madrapps/add-reviewers@v1 12 | with: 13 | token: ${{ secrets.ACCESS_TOKEN }} 14 | reviewers: GuillaumeFalourd 15 | re-request-when-approved: true 16 | re-request-when-changes-requested: true 17 | -------------------------------------------------------------------------------- /.github/workflows/replace-token.yml: -------------------------------------------------------------------------------- 1 | name: Replace Token 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v3 10 | - run: cat file.json 11 | - uses: cschleiden/replace-tokens@v1 12 | with: 13 | files: 'file.json' 14 | env: 15 | SECRET_TOKEN: ${{ secrets.SECRET_TEST }} 16 | - run: cat file.json -------------------------------------------------------------------------------- /.github/workflows/ghaction-github-status.yml: -------------------------------------------------------------------------------- 1 | name: Github Action Github Status 2 | 3 | on: push 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Check GitHub Status 10 | uses: crazy-max/ghaction-github-status@v3 11 | with: 12 | overall_threshold: minor 13 | pages_threshold: partial_outage 14 | 15 | - name: Checkout 16 | uses: actions/checkout@v3 -------------------------------------------------------------------------------- /.github/workflows/purge-artifacts.yml: -------------------------------------------------------------------------------- 1 | name: 'Delete old artifacts' 2 | on: 3 | schedule: 4 | - cron: '0 * * * MON-FRI' 5 | 6 | jobs: 7 | delete-artifacts: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: kolpav/purge-artifacts-action@v1 11 | with: 12 | token: ${{ secrets.GITHUB_TOKEN }} 13 | expire-in: 7days # Setting this to 0 will delete all artifacts (https://github.com/jkroso/parse-duration) 14 | -------------------------------------------------------------------------------- /.github/workflows/close-pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Close Pull Request 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened, reopened] 6 | paths: 7 | - '**/close-pull-request.yml' 8 | 9 | jobs: 10 | test: 11 | runs-on: "ubuntu-latest" 12 | steps: 13 | - uses: superbrothers/close-pull-request@v3 14 | with: 15 | comment: "Hi, this PR will be closed automatically. Please do not touch the 'close-pull-request.yml' file." 16 | -------------------------------------------------------------------------------- /.github/workflows/create-json.yml: -------------------------------------------------------------------------------- 1 | name: Create JSON 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v3 10 | - run: cat file.json 11 | - name: create-json 12 | uses: jsdaniell/create-json@1.1.2 13 | with: 14 | name: "file.json" 15 | json: '{"appId":"foofoo", "secret_token":"${{ secrets.SECRET_TEST }}"}' 16 | - run: cat file.json -------------------------------------------------------------------------------- /.github/workflows/read-file.yml: -------------------------------------------------------------------------------- 1 | name: Read File 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | job: 8 | runs-on: ubuntu-18.04 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: Read checkout-workflow.txt 12 | id: txt 13 | uses: juliangruber/read-file-action@v1 14 | with: 15 | path: ./checkout-workflow.txt 16 | - name: Echo checkout-workflow.txt 17 | run: echo "${{ steps.txt.outputs.content }}" -------------------------------------------------------------------------------- /.github/workflows/publish-docker.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@master 10 | 11 | # Comment as DOCKER secrets not set 12 | # - name: Publish to Registry 13 | # uses: elgohr/Publish-Docker-Github-Action@master 14 | # with: 15 | # name: myDocker/repository 16 | # username: ${{ secrets.DOCKER_USERNAME }} 17 | # password: ${{ secrets.DOCKER_PASSWORD }} -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: 'Stale' 2 | 3 | on: 4 | schedule: 5 | - cron: '30 1 * * *' 6 | 7 | jobs: 8 | stale: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/stale@v9.1.0 12 | with: 13 | stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale' 14 | stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale' 15 | close-issue-reason: 'not_planned' 16 | -------------------------------------------------------------------------------- /.github/workflows/first-interaction.yml: -------------------------------------------------------------------------------- 1 | name: First Interaction 2 | 3 | on: 4 | pull_request: 5 | issues: 6 | types: opened 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: "Thank you for opening this ISSUE. We'll give you a return ASAP 👍" 16 | pr-message: "Thank you for your contribution. We'll give you a return ASAP 👍" 17 | -------------------------------------------------------------------------------- /.github/workflows/set-secrets.yml: -------------------------------------------------------------------------------- 1 | name: Set Secrets 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | job: 8 | runs-on: ubuntu-18.04 9 | steps: 10 | - uses: hmanzur/actions-set-secret@v2.0.0 11 | with: 12 | name: 'MY_SECRET_NAME' 13 | value: 'Lorem ipsun dolor simit' 14 | repository: GuillaumeFalourd/useful-actions 15 | token: ${{ secrets.ACCESS_TOKEN }} 16 | 17 | - name: "Echo Created Secret" 18 | run: echo ${{ secrets.MY_SECRET_NAME }} -------------------------------------------------------------------------------- /.github/workflows/delete-artifact.yml: -------------------------------------------------------------------------------- 1 | name: Delete Artifacts 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | 6 | jobs: 7 | job1: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | 12 | - run: echo hello > world.txt 13 | 14 | - uses: actions/upload-artifact@v1 15 | with: 16 | name: my-artifact 17 | path: world.txt 18 | 19 | # delete-artifact 20 | - uses: geekyeggo/delete-artifact@v1 21 | with: 22 | name: my-artifact -------------------------------------------------------------------------------- /.github/workflows/repository-dispatch.yml: -------------------------------------------------------------------------------- 1 | name: Repository Dispatch 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Repository Dispatch 10 | uses: peter-evans/repository-dispatch@v1.1.3 11 | with: 12 | token: ${{ secrets.ACCESS_TOKEN }} 13 | repository: GuillaumeFalourd/useful-actions 14 | event-type: event-demo 15 | client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' -------------------------------------------------------------------------------- /.github/workflows/enforce-labels.yml: -------------------------------------------------------------------------------- 1 | name: Enforce PR labels 2 | 3 | on: 4 | pull_request: 5 | types: [labeled, unlabeled, opened, edited, synchronize] 6 | 7 | jobs: 8 | enforce-label: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: yogevbd/enforce-label-action@2.1.0 12 | with: 13 | REQUIRED_LABELS_ANY: "bug,enhancement,skip-changelog,test" 14 | REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['bug','enhancement','skip-changelog','test']" 15 | BANNED_LABELS: "banned" -------------------------------------------------------------------------------- /.github/workflows/auto-accept-collabs.yml: -------------------------------------------------------------------------------- 1 | name: Auto Accept Collabs 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 1 * * MON-FRI" # Runs at 01:00 UTC 7 | 8 | jobs: 9 | sync: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Fetching Local Repository 13 | uses: actions/checkout@v3 14 | - name: Auto Accept Collabs 15 | uses: kbrashears5/github-action-auto-accept-collabs@857db86b3be636b6dedcb36726ec97e0139dc7d7 16 | with: 17 | TOKEN: ${{ secrets.ACCESS_TOKEN }} 18 | -------------------------------------------------------------------------------- /.github/workflows/replace-values-action.yml: -------------------------------------------------------------------------------- 1 | name: Replace Values Action 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v3 10 | - name: Replace multiple values in a specific file 11 | uses: GuillaumeFalourd/replace-values-action@v1.1 12 | with: 13 | file_path: ./file.json 14 | parameters: | 15 | #{SECRET_TOKEN}# >> SECRET_VALUE 16 | blabla >> my_app_id 17 | - run: cat ./file.json -------------------------------------------------------------------------------- /.github/workflows/super-linter.yml: -------------------------------------------------------------------------------- 1 | name: Super Linter 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | build: 7 | name: Super Linter 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout Code 11 | uses: actions/checkout@v2 12 | with: 13 | fetch-depth: 0 14 | - name: Lint Code Base 15 | uses: github/super-linter@v4.9.2 16 | env: 17 | VALIDATE_ALL_CODEBASE: false 18 | DEFAULT_BRANCH: main 19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 | -------------------------------------------------------------------------------- /.github/workflows/workflow-dispatch-triggerred.yml: -------------------------------------------------------------------------------- 1 | name: Workflow Dispatch Triggered 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | input: 7 | description: "Test" 8 | required: false 9 | default: "World" 10 | repository_dispatch: 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Repository Dispatch Triggered 17 | run: | 18 | echo "Workflow triggered successfully by workflow dispatch action!" 19 | echo Hello ${{ github.event.inputs.input }} 20 | -------------------------------------------------------------------------------- /.github/workflows/github-script.yml: -------------------------------------------------------------------------------- 1 | name: Github Script 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | comment: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/github-script@v3 12 | with: 13 | github-token: ${{secrets.GITHUB_TOKEN}} 14 | script: | 15 | github.issues.createComment({ 16 | issue_number: context.issue.number, 17 | owner: context.repo.owner, 18 | repo: context.repo.repo, 19 | body: '👋 Thanks for reporting!' 20 | }) -------------------------------------------------------------------------------- /.github/workflows/manual-approval.yml: -------------------------------------------------------------------------------- 1 | name: Manual Approval 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | build: 8 | name: build 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Build 12 | run: echo building 13 | 14 | deploy: 15 | name: deploy 16 | runs-on: ubuntu-latest 17 | needs: build 18 | steps: 19 | - uses: trstringer/manual-approval@v1 20 | with: 21 | secret: ${{ github.TOKEN }} 22 | approvers: GuillaumeFalourd 23 | - name: Deploy to production 24 | run: echo deploying -------------------------------------------------------------------------------- /.github/workflows/cache.yml: -------------------------------------------------------------------------------- 1 | name: Cache 2 | 3 | on: push 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v2 11 | 12 | - name: Cache Primes 13 | id: cache-primes 14 | uses: actions/cache@v2 15 | with: 16 | path: prime-numbers 17 | key: ${{ runner.os }}-primes 18 | 19 | - name: Generate Prime Numbers 20 | if: steps.cache-primes.outputs.cache-hit != 'true' 21 | run: echo "generates prime-numbers" 22 | 23 | - name: Use Prime Numbers 24 | run: echo "use prime-numbers" -------------------------------------------------------------------------------- /.github/workflows/checkout.yml: -------------------------------------------------------------------------------- 1 | name: Checkout 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'dev' # For the dev branch 7 | schedule: 8 | - cron: "0 0 * * MON-FRI" # Runs at 00:00 UTC 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v2 16 | - run: | 17 | date > checkout-workflow.txt 18 | git config user.name github-actions 19 | git config user.email github-actions@github.com 20 | git add . 21 | git commit -m "generated checkout workflow file" 22 | git push 23 | -------------------------------------------------------------------------------- /.github/workflows/file-existence.yml: -------------------------------------------------------------------------------- 1 | name: "File Existence" 2 | 3 | on: [push, pull_request, workflow_dispatch] 4 | 5 | jobs: 6 | file_existence: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout code 10 | uses: actions/checkout@v2.3.4 11 | 12 | - name: Check file existence 13 | id: check_files 14 | uses: andstor/file-existence-action@v1 15 | with: 16 | files: "README.md" 17 | 18 | - name: File exists 19 | if: steps.check_files.outputs.files_exists == 'true' 20 | # Only runs if all of the files exists 21 | run: echo All files exists! -------------------------------------------------------------------------------- /.github/workflows/action-cond.yml: -------------------------------------------------------------------------------- 1 | name: Action Cond 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | add_label: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Determine Checkout Depth 10 | uses: haya14busa/action-cond@v1.0.2 11 | id: fetchDepth 12 | with: 13 | cond: ${{ github.event_name == 'pull_request' }} 14 | if_true: '0' # string value 15 | if_false: '1' # string value 16 | 17 | - name: Checkout 18 | uses: actions/checkout@v2 19 | with: 20 | fetch-depth: ${{ steps.fetchDepth.outputs.value }} 21 | token: ${{ secrets.ACCESS_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/copycat.yml: -------------------------------------------------------------------------------- 1 | name: Copycat 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@v2.3.4 11 | - name: Make changes 12 | run: date > copycat-workflow.txt 13 | - name: Copy 14 | uses: andstor/copycat-action@v3 15 | with: 16 | personal_token: ${{ secrets.ACCESS_TOKEN }} 17 | src_path: /. 18 | dst_path: /backup/ 19 | dst_owner: GuillaumeFalourd 20 | dst_repo_name: poc-github-actions 21 | src_branch: main 22 | dst_branch: main -------------------------------------------------------------------------------- /.github/workflows/app-token.yml: -------------------------------------------------------------------------------- 1 | name: App Token 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | job: 8 | runs-on: ubuntu-18.04 9 | steps: 10 | - name: Generate token 11 | id: generate_token 12 | uses: tibdex/github-app-token@v1 13 | with: 14 | app_id: ${{ secrets.APP_ID }} 15 | private_key: ${{ secrets.PRIVATE_KEY }} 16 | # Optional (defaults to the current repository). 17 | # repository: owner/repo 18 | - name: Use token 19 | env: 20 | TOKEN: ${{ steps.generate_token.outputs.token }} 21 | run: | 22 | echo "The generated token is masked: ${TOKEN}" -------------------------------------------------------------------------------- /.github/workflows/wait-on-check.yml: -------------------------------------------------------------------------------- 1 | name: Wait on Check 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | wait-on-check: 8 | name: Wait on check 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Wait for Multiply by 9 job (Upload & Download Artifacts workflow) to succeed 12 | uses: lewagon/wait-on-check-action@v1.1.1 13 | with: 14 | ref: main 15 | check-name: 'Multiply by 9' 16 | repo-token: ${{ secrets.GITHUB_TOKEN }} 17 | wait-interval: 5 18 | 19 | after-wait-on-check: 20 | name: After wait on check 21 | needs: 22 | - wait-on-check 23 | runs-on: ubuntu-latest 24 | steps: 25 | - run: echo "Will run after other workflows or jobs finished." -------------------------------------------------------------------------------- /.github/workflows/paths-filter.yml: -------------------------------------------------------------------------------- 1 | name: Paths Filter 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | paths-filter: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: dorny/paths-filter@v2 11 | id: filter 12 | with: 13 | filters: | 14 | workflows: 15 | - '.github/workflows/**' 16 | 17 | # run only if 'workflows' files were changed 18 | - name: workflow tests 19 | if: steps.filter.outputs.workflows == 'true' 20 | run: echo "Workflow file" 21 | 22 | # run only if not 'workflows' files were changed 23 | - name: not workflow tests 24 | if: steps.filter.outputs.workflows != 'true' 25 | run: echo "NOT workflow file" -------------------------------------------------------------------------------- /.github/workflows/recreate-release.yml: -------------------------------------------------------------------------------- 1 | name: Recreate Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*.*.*' 7 | 8 | jobs: 9 | build: 10 | name: Recreate Release 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | - name: Recreate Release 16 | uses: GongT/actions-recreate-release@v1 17 | env: 18 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 19 | with: 20 | tag_name: latest 21 | release_name: Release at ${{ github.ref }} 22 | body: | 23 | Changes in this Release 24 | - First Change 25 | - Second Change 26 | draft: false 27 | prerelease: false -------------------------------------------------------------------------------- /.github/workflows/compress-image.yml: -------------------------------------------------------------------------------- 1 | name: Compress Images 2 | 3 | on: 4 | pull_request: 5 | # Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed. 6 | # See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for reference. 7 | paths: 8 | - '**.jpg' 9 | - '**.jpeg' 10 | - '**.png' 11 | - '**.webp' 12 | jobs: 13 | build: 14 | name: calibreapp/image-actions 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout Repo 18 | uses: actions/checkout@v2 19 | - name: Compress Images 20 | uses: calibreapp/image-actions@main 21 | with: 22 | githubToken: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/changed-files.yml: -------------------------------------------------------------------------------- 1 | name: Changed Files 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest # windows-latest | macos-latest 14 | name: Test changed-files 15 | steps: 16 | - uses: actions/checkout@v2 17 | with: 18 | fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. 19 | 20 | - name: Get changed files 21 | id: changed-files 22 | uses: tj-actions/changed-files@v41.0.1 23 | 24 | - name: List all changed files 25 | run: | 26 | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do 27 | echo "$file was changed" 28 | done 29 | -------------------------------------------------------------------------------- /.github/workflows/gpt-review.yml: -------------------------------------------------------------------------------- 1 | name: GPT Review 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | gpt-review: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v4 11 | - name: Chat GPT Code Peer Review 12 | uses: edelauna/gpt-review@v1.2.1 13 | with: 14 | # OpenAI API key used for sending patch diffs for review. 15 | # Required 16 | openai_api_key: ${{ secrets.OPENAI_API_KEY }} 17 | 18 | # The target branch for the git diff to run against. 19 | # Default: ${{ github.base_ref }} 20 | target_branch: '' 21 | 22 | # List of comma seperated values for files to ignore as part of the review process. 23 | ignore_files: '' 24 | -------------------------------------------------------------------------------- /.github/workflows/phonito.yml: -------------------------------------------------------------------------------- 1 | name: Phonito 2 | 3 | on: [push] 4 | 5 | jobs: 6 | 7 | build: 8 | 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v1 13 | 14 | - name: Set tag var 15 | id: vars 16 | run: echo ::set-output name=docker_tag::$(echo ${GITHUB_REF} | cut -d'/' -f3)-${GITHUB_SHA} 17 | 18 | - name: Build the Docker image 19 | run: docker build . --file Dockerfile --tag myapp:${{ steps.vars.outputs.docker_tag }} 20 | 21 | # Comment as PHONITO secret not set 22 | # - name: Scan with Phonito Security 23 | # uses: phonito/phonito-scanner-action@master 24 | # with: 25 | # image: myapp:${{ steps.vars.outputs.docker_tag }} 26 | # phonito-token: ${{ secrets.PHONITO_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/typos.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Typos 3 | 4 | on: [workflow_dispatch] 5 | 6 | jobs: 7 | run: 8 | name: Spell Check with Typos 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout Actions Repository 12 | uses: actions/checkout@v2 13 | 14 | - name: Prepare file with mistakes. 15 | run: echo "The quick brown foxx jumped over the slepy dog." > file.txt 16 | - name: Test force pass with mistakes 17 | uses: crate-ci/typos@v1.0.4 18 | with: 19 | files: ./file.txt 20 | 21 | - name: Prepare file with no mistakes. 22 | run: echo "The quick brown fox jumped over the sleepy dog." > file.txt 23 | - name: Test force pass with no mistakes 24 | uses: crate-ci/typos@v1.0.4 25 | with: 26 | files: ./file.txt -------------------------------------------------------------------------------- /.github/auto_assign.yml: -------------------------------------------------------------------------------- 1 | # Set to true to add reviewers to pull requests 2 | addReviewers: true 3 | 4 | # Set to true to add assignees to pull requests 5 | addAssignees: true 6 | 7 | # A list of reviewers to be added to pull requests (GitHub user name) 8 | reviewers: 9 | - GuillaumeFalourd 10 | 11 | # A number of reviewers added to the pull request 12 | # Set 0 to add all the reviewers (default: 0) 13 | numberOfReviewers: 0 14 | 15 | # A list of assignees, overrides reviewers if set 16 | # assignees: 17 | # - assigneeA 18 | 19 | # A number of assignees to add to the pull request 20 | # Set to 0 to add all of the assignees. 21 | # Uses numberOfReviewers if unset. 22 | # numberOfAssignees: 2 23 | 24 | # A list of keywords to be skipped the process that add reviewers if pull requests include it 25 | # skipKeywords: 26 | # - wip -------------------------------------------------------------------------------- /.github/workflows/retry-action.yml: -------------------------------------------------------------------------------- 1 | name: Retry Action 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | tags: 7 | - 'v*.*.*' 8 | 9 | jobs: 10 | wandalen-retry: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name : Retry action 14 | uses : Wandalen/wretry.action@0.2.7 15 | with : 16 | action : actions/setup-node@v1 17 | with : | 18 | node-version : 16.x 19 | attempt_limit : 3 20 | attempt_delay: 1000 21 | 22 | # nick-fields-retry: 23 | # runs-on: ubuntu-latest 24 | # steps: 25 | # - name : Retry action 26 | # uses: nick-fields/retry@v2 27 | # with: 28 | # timeout_seconds: 15 29 | # max_attempts: 3 30 | # retry_on: error 31 | # command: npm run some-typically-fast-script 32 | -------------------------------------------------------------------------------- /.github/workflows/horusec.yml: -------------------------------------------------------------------------------- 1 | name: Horusec 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | checking_code: 7 | runs-on: ubuntu-latest 8 | name: Horusec Scan 9 | steps: 10 | - name: Check out code 11 | uses: actions/checkout@v2.3.4 12 | with: # Required when commit authors is enabled 13 | fetch-depth: 0 14 | # - name: Run Horusec 15 | # id: run_horusec 16 | # uses: fike/horusec-action@main 17 | # with: 18 | # arguments: -p="./" --ignore="**/.vscode/**, **/*.env, **/.mypy_cache/**, **/tests/**" 19 | - name: Running Horusec Security 20 | run: | 21 | curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash -s latest 22 | horusec start -p="./" -e="true" --ignore="**/.vscode/**, **/*.env, **/.mypy_cache/**, **/tests/**" 23 | -------------------------------------------------------------------------------- /.github/workflows/commit-and-push.yml: -------------------------------------------------------------------------------- 1 | name: Commit and Push 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | workflow_dispatch: 8 | 9 | jobs: 10 | commit-and-push: 11 | name: commit-and-push 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: checkout 15 | uses: actions/checkout@v2 16 | with: 17 | ref: main 18 | 19 | - name: Make changes 20 | run: date > commit-and-push-workflow.txt 21 | 22 | - name: Push code 23 | uses: github-actions-x/commit@v2.9 24 | with: 25 | github-token: ${{ secrets.GITHUB_TOKEN }} 26 | push-branch: 'main' 27 | commit-message: 'commit and push updated report' 28 | force-add: 'true' 29 | files: commit-and-push-workflow.txt 30 | name: ${{ github.actor }} 31 | email: ${{ github.actor }}@users.noreply.github.com 32 | -------------------------------------------------------------------------------- /assert.txt: -------------------------------------------------------------------------------- 1 | total 440 2 | drwxr-xr-x 14 runner docker 448B Nov 29 10:06 . 3 | drwxr-xr-x 88 runner docker 2.8K Nov 25 18:51 .. 4 | drwxr-xr-x 15 runner docker 480B Nov 29 10:06 .git 5 | drwxr-xr-x 4 runner docker 128B Jul 6 11:48 .github 6 | -rw-r--r-- 1 runner docker 3.4K Apr 8 2021 CODE_OF_CONDUCT.md 7 | -rw-r--r-- 1 runner docker 1.0K Nov 19 09:39 CONTRIBUTING.md 8 | -rw-r--r-- 1 runner docker 149B May 27 2021 Dockerfile 9 | -rw-r--r-- 1 runner docker 11K Apr 8 2021 LICENSE 10 | -rw-r--r-- 1 runner docker 17K Nov 19 09:39 README.md 11 | -rw-r--r-- 1 runner docker 29B Nov 29 10:06 checkout-workflow.txt 12 | -rw-r--r-- 1 runner docker 29B Nov 19 09:39 commit-and-push-workflow.txt 13 | -rw-r--r-- 1 runner docker 27K Apr 8 2021 git-branchs.png 14 | -rw-r--r-- 1 runner docker 29B Nov 29 10:06 pull-request-workflow.txt 15 | -rw-r--r-- 1 runner docker 132K Jun 22 15:46 useful-github-actions.png -------------------------------------------------------------------------------- /.github/workflows/ghaction-container-scan.yml: -------------------------------------------------------------------------------- 1 | name: Github Action Container Scan 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | scan: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@v3 12 | 13 | - name: Set up QEMU 14 | uses: docker/setup-qemu-action@v2 15 | 16 | - name: Set up Docker Buildx 17 | uses: docker/setup-buildx-action@v2 18 | 19 | # Comment as DOCKER secrets not set 20 | 21 | # - name: Login to DockerHub 22 | # uses: docker/login-action@v2 23 | # with: 24 | # username: ${{ secrets.DOCKERHUB_USERNAME }} 25 | # password: ${{ secrets.DOCKERHUB_TOKEN }} 26 | 27 | # - name: Build 28 | # uses: docker/build-push-action@v3 29 | # with: 30 | # context: . 31 | # push: true 32 | # tags: user/app:latest 33 | 34 | # - name: Scan for vulnerabilities 35 | # uses: crazy-max/ghaction-container-scan@v1 36 | # with: 37 | # image: user/app:latest -------------------------------------------------------------------------------- /.github/workflows/workflow-dispatch.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Workflow Dispatch 3 | 4 | on: [workflow_dispatch] 5 | 6 | jobs: 7 | job1: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Invoke workflow without inputs 11 | uses: benc-uk/workflow-dispatch@v1 12 | with: 13 | workflow: 'Workflow Dispatch Triggered' 14 | token: ${{ secrets.ACCESS_TOKEN }} 15 | 16 | job2: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Invoke workflow with inputs 20 | uses: benc-uk/workflow-dispatch@v1 21 | with: 22 | workflow: 'Workflow Dispatch Triggered' 23 | token: ${{ secrets.ACCESS_TOKEN }} 24 | inputs: '{ "input": "You" }' 25 | 26 | job3: 27 | runs-on: ubuntu-latest 28 | steps: 29 | - name: Invoke workflow in another repo with inputs 30 | uses: benc-uk/workflow-dispatch@v1 31 | with: 32 | workflow: '00 - Workflow Dispatch' 33 | repo: GuillaumeFalourd/poc-github-actions 34 | token: ${{ secrets.ACCESS_TOKEN }} 35 | inputs: '{ "input": "You" }' 36 | -------------------------------------------------------------------------------- /.github/workflows/skip-duplicate.yml: -------------------------------------------------------------------------------- 1 | name: Skip Duplicate 2 | 3 | on: # rebuild any PRs and main branch changes 4 | pull_request: 5 | push: 6 | 7 | jobs: 8 | pre_job: 9 | runs-on: ubuntu-latest 10 | outputs: 11 | should_skip: ${{ steps.skip_check.outputs.should_skip }} 12 | steps: 13 | - uses: actions/checkout@v2.3.4 14 | - uses: ./ 15 | id: skip_check 16 | with: 17 | concurrent_skipping: 'never' 18 | # skip_after_successful_duplicate: 'true' 19 | # paths_ignore: '["**/README.md", "**/docs/**"]' 20 | # do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' 21 | cancel_others: true 22 | 23 | main_job_not_skipped: 24 | needs: pre_job 25 | if: ${{ needs.pre_job.outputs.should_skip != 'true' }} 26 | runs-on: ubuntu-latest 27 | steps: 28 | - run: echo "There is something to do here (not skipped)" 29 | 30 | main_job_skipped: 31 | needs: pre_job 32 | if: ${{ needs.pre_job.outputs.should_skip == 'true' }} 33 | runs-on: ubuntu-latest 34 | steps: 35 | - run: echo "There is nothing to do here (skipped)" -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution 2 | 3 | You're welcome to add useful actions to the repository 4 | 5 | ## New contents for the project 6 | 7 | **Always** base your work on the project's `main` branch, naming your new branch 8 | according to the following guide: 9 | 10 | ![branchs](/git-branchs.png) 11 | 12 | **Examples: `feature/new-action-name` or `fix/action-name`** 13 | 14 | ## Guidelines 15 | 16 | - Contents should be written in English. 17 | 18 | - Add new actions on the [Global Actions section](https://github.com/GuillaumeFalourd/useful-actions#-global-actions), the [Docker Actions section](https://github.com/GuillaumeFalourd/useful-actions#-docker-actions) or on the [Other Tools Actions section](https://github.com/GuillaumeFalourd/useful-actions#-other-tools-actions) on the main README file (respect an `alphabetical` order). 19 | 20 | - New actions should be associated to a workflow example on the `.github/workflows` directory of the [Useful Actions](https://github.com/GuillaumeFalourd/useful-actions) repository, based on the official action repository examples. 21 | 22 | _Observation: If the action can be triggered through a `workflow_dispatch` event, please add it to the trigger options on the workflow implementation. It will make tests easier._ 23 | -------------------------------------------------------------------------------- /.github/workflows/create-pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Create Pull Request 2 | 3 | on: 4 | schedule: 5 | - cron: "0 6 * * MON-FRI" # Runs at 06:00 UTC 6 | workflow_dispatch: 7 | 8 | jobs: 9 | createPullRequest: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | 14 | - name: Make changes to pull request 15 | run: date > pull-request-workflow.txt 16 | 17 | - name: Create Pull Request 18 | id: cpr 19 | uses: peter-evans/create-pull-request@v3 20 | with: 21 | token: ${{ secrets.ACCESS_TOKEN }} 22 | commit-message: Update report 23 | committer: GitHub 24 | author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> 25 | signoff: false 26 | delete-branch: true 27 | title: '[Example] Update report' 28 | body: | 29 | Update report 30 | - Updated with *today's* date 31 | - Auto-generated by [create-pull-request][1] 32 | labels: | 33 | report 34 | automerge 35 | automated pr 36 | assignees: GuillaumeFalourd 37 | draft: false 38 | 39 | - name: Check outputs 40 | run: | 41 | echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" 42 | echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" -------------------------------------------------------------------------------- /.github/workflows/upload-download-artifacts.yml: -------------------------------------------------------------------------------- 1 | name: Upload & Download Artifacts 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | 6 | jobs: 7 | 8 | job_1: 9 | name: Add 3 and 7 10 | runs-on: ubuntu-latest 11 | steps: 12 | - shell: bash 13 | run: | 14 | expr 3 + 7 > math-homework.txt 15 | - name: Upload math result for job 1 16 | uses: actions/upload-artifact@v4.4.0 17 | with: 18 | name: homework 19 | path: math-homework.txt 20 | 21 | job_2: 22 | name: Multiply by 9 23 | needs: job_1 24 | runs-on: windows-latest 25 | steps: 26 | - name: Download math result for job 1 27 | uses: actions/download-artifact@v4.1.8 28 | with: 29 | name: homework 30 | - shell: bash 31 | run: | 32 | value=`cat math-homework.txt` 33 | expr $value \* 9 > math-homework.txt 34 | - name: Upload math result for job 2 35 | uses: actions/upload-artifact@v4.4.0 36 | with: 37 | name: homework 38 | path: math-homework.txt 39 | 40 | job_3: 41 | name: Display results 42 | needs: job_2 43 | runs-on: macOS-latest 44 | steps: 45 | - name: Download math result for job 2 46 | uses: actions/download-artifact@v4.1.8 47 | with: 48 | name: homework 49 | - name: Print the final result 50 | shell: bash 51 | run: | 52 | value=`cat math-homework.txt` 53 | echo The result is $value -------------------------------------------------------------------------------- /.github/workflows/get-workflow-origin.yml: -------------------------------------------------------------------------------- 1 | name: Get Workflow Origin Information (PR) 2 | on: 3 | pull_request: 4 | branches: ['main'] 5 | 6 | jobs: 7 | get-info: 8 | name: "Get information about the source run" 9 | runs-on: ubuntu-latest 10 | outputs: 11 | sourceHeadRepo: ${{ steps.workflow-run-info.outputs.sourceHeadRepo }} 12 | sourceHeadBranch: ${{ steps.workflow-run-info.outputs.sourceHeadBranch }} 13 | sourceHeadSha: ${{ steps.workflow-run-info.outputs.sourceHeadSha }} 14 | mergeCommitSha: ${{ steps.workflow-run-info.outputs.mergeCommitSha }} 15 | targetCommitSha: ${{ steps.workflow-run-info.outputs.targetCommitSha }} 16 | pullRequestNumber: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} 17 | pullRequestLabels: ${{ steps.workflow-run-info.outputs.pullRequestLabels }} 18 | targetBranch: ${{ steps.source-run-info.outputs.targetBranch }} 19 | sourceEvent: ${{ steps.workflow-run-info.outputs.sourceEvent }} 20 | steps: 21 | - name: "Get information about the current run" 22 | uses: potiuk/get-workflow-origin@v1_3 23 | id: workflow-run-info 24 | with: 25 | token: ${{ secrets.GITHUB_TOKEN }} 26 | sourceRunId: ${{ github.event.workflow_run.id }} 27 | 28 | test-info: 29 | runs-on: ubuntu-latest 30 | needs: get-info 31 | steps: 32 | - name: Output 33 | run: | 34 | echo ${{needs.get-info.outputs.sourceHeadRepo}} 35 | echo ${{needs.get-info.outputs.sourceHeadBranch}} 36 | echo ${{needs.get-info.outputs.sourceHeadSha}} 37 | echo ${{needs.get-info.outputs.mergeCommitSha}} 38 | echo ${{needs.get-info.outputs.targetCommitSha}} 39 | echo ${{needs.get-info.outputs.pullRequestNumber}} 40 | echo ${{needs.get-info.outputs.pullRequestLabels}} 41 | echo ${{needs.get-info.outputs.targetBranch}} 42 | echo ${{needs.get-info.outputs.sourceEvent}} -------------------------------------------------------------------------------- /.github/workflows/get-workflow-origin-run.yml: -------------------------------------------------------------------------------- 1 | name: Get Workflow Origin Information (Run) 2 | 3 | on: 4 | workflow_run: 5 | workflows: ['Get information'] 6 | types: ['requested'] 7 | 8 | jobs: 9 | get-info: 10 | name: "Get information about the source run" 11 | runs-on: ubuntu-latest 12 | outputs: 13 | sourceHeadRepo: ${{ steps.source-run-info.outputs.sourceHeadRepo }} 14 | sourceHeadBranch: ${{ steps.source-run-info.outputs.sourceHeadBranch }} 15 | sourceHeadSha: ${{ steps.source-run-info.outputs.sourceHeadSha }} 16 | mergeCommitSha: ${{ steps.source-run-info.outputs.mergeCommitSha }} 17 | targetCommitSha: ${{ steps.source-run-info.outputs.targetCommitSha }} 18 | pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }} 19 | pullRequestLabels: ${{ steps.source-run-info.outputs.pullRequestLabels }} 20 | targetBranch: ${{ steps.source-run-info.outputs.targetBranch }} 21 | sourceEvent: ${{ steps.source-run-info.outputs.sourceEvent }} 22 | steps: 23 | - name: "Get information about the origin 'CI' run" 24 | uses: potiuk/get-workflow-origin@v1_1 25 | id: source-run-info 26 | with: 27 | token: ${{ secrets.GITHUB_TOKEN }} 28 | sourceRunId: ${{ github.event.workflow_run.id }}``` 29 | 30 | test-info: 31 | runs-on: ubuntu-latest 32 | needs: get-info 33 | steps: 34 | - name: Output 35 | run: | 36 | echo ${{needs.get-info.outputs.sourceHeadRepo}} 37 | echo ${{needs.get-info.outputs.sourceHeadBranch}} 38 | echo ${{needs.get-info.outputs.sourceHeadSha}} 39 | echo ${{needs.get-info.outputs.mergeCommitSha}} 40 | echo ${{needs.get-info.outputs.targetCommitSha}} 41 | echo ${{needs.get-info.outputs.pullRequestNumber}} 42 | echo ${{needs.get-info.outputs.pullRequestLabels}} 43 | echo ${{needs.get-info.outputs.targetBranch}} 44 | echo ${{needs.get-info.outputs.sourceEvent}} -------------------------------------------------------------------------------- /.github/workflows/branch-names.yml: -------------------------------------------------------------------------------- 1 | name: Branch Names 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | branch-names: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Get branch names 11 | id: branch-name 12 | uses: tj-actions/branch-names@v7.0.7 13 | 14 | - name: Running on the default branch. 15 | if: steps.branch-name.outputs.is_default == 'true' 16 | run: | 17 | echo "Running on default: ${{ steps.branch-name.outputs.current_branch }}" 18 | # Outputs: "Running on default: main". 19 | 20 | - name: Running on a pull request branch. 21 | if: steps.branch-name.outputs.is_default == 'false' 22 | run: | 23 | echo "Running on pr: ${{ steps.branch-name.outputs.current_branch }}" 24 | # Outputs: "Running on pr: feature/test". 25 | 26 | - name: Current branch name 27 | if: github.event_name == 'pull_request' 28 | run: | 29 | echo "${{ steps.branch-name.outputs.current_branch }}" 30 | # Outputs: "feature/test" current PR branch. 31 | 32 | - name: Current branch name 33 | if: github.event_name == 'push' 34 | run: | 35 | echo "${{ steps.branch-name.outputs.current_branch }}" 36 | # Outputs: "main" the branch that triggered the push event. 37 | 38 | - name: Get Ref branch name 39 | run: | 40 | echo "${{ steps.branch-name.outputs.ref_branch }}" 41 | # Outputs: "main" for non PR branches | "1/merge" for a PR branch 42 | 43 | - name: Get Head Ref branch name 44 | if: github.event_name == 'pull_request' 45 | run: | 46 | echo "${{ steps.branch-name.outputs.head_ref_branch }}" 47 | # Outputs: "feature/test" current PR branch. 48 | 49 | - name: Get Base Ref branch name 50 | if: github.event_name == 'pull_request' 51 | run: | 52 | echo "${{ steps.branch-name.outputs.base_ref_branch }}" 53 | # Outputs: "main" for main <- PR branch. 54 | 55 | - name: Get the current tag 56 | if: startsWith(github.ref, 'refs/tags/') 57 | run: | 58 | echo "${{ steps.branch-name.outputs.tag }}" 59 | # Outputs: "v0.0.1" OR "0.0.1" -------------------------------------------------------------------------------- /.github/workflows/git-auto-commit.yml: -------------------------------------------------------------------------------- 1 | name: Git Auto Commit 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v2 15 | with: 16 | ref: ${{ github.head_ref }} 17 | 18 | - name: Make changes 19 | run: date > git-auto-commit-workflow.txt 20 | 21 | - name: Add txt file 22 | run: git add git-auto-commit-workflow.txt 23 | 24 | - name: Push code 25 | uses: stefanzweifel/git-auto-commit-action@v4 26 | with: 27 | # Optional, but recommended 28 | # Defaults to "Apply automatic changes" 29 | commit_message: Automated Change 30 | 31 | # Optional branch name where commit should be pushed to. 32 | # Defaults to the current branch. 33 | branch: main 34 | 35 | # Optional. Used by `git-commit`. 36 | # See https://git-scm.com/docs/git-commit#_options 37 | commit_options: '--no-verify --signoff' 38 | 39 | # Optional glob pattern of files which should be added to the commit 40 | # Defaults to all (.) 41 | # See the `pathspec`-documentation for git 42 | # - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203 43 | # - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec 44 | file_pattern: . 45 | 46 | # Optional local file path to the repository 47 | # Defaults to the root of the repository 48 | repository: . 49 | 50 | # Optional commit user and author settings 51 | commit_user_name: My GitHub Actions Bot # defaults to "GitHub Actions" 52 | commit_user_email: my-github-actions-bot@example.org # defaults to "actions@github.com" 53 | commit_author: Author # defaults to author of the commit that triggered the run 54 | 55 | # Optional tag message 56 | # Action will create and push a new tag to the remote repository and the defined branch 57 | tagging_message: 'v1.0.0' 58 | 59 | # Optional. Used by `git-status` 60 | # See https://git-scm.com/docs/git-status#_options 61 | status_options: '--untracked-files=no' 62 | 63 | # Optional. Used by `git-add` 64 | # See https://git-scm.com/docs/git-add#_options 65 | add_options: '-u' 66 | 67 | # Optional. Used by `git-push` 68 | # See https://git-scm.com/docs/git-push#_options 69 | push_options: '--force' 70 | 71 | # Optional. Disable dirty check and always try to create a commit and push 72 | skip_dirty_check: true 73 | 74 | # Optional. Skip internal call to `git fetch` 75 | skip_fetch: true 76 | 77 | # Optional. Prevents the shell from expanding filenames. 78 | # Details: https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html 79 | disable_globbing: true -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at [ritchie@zup.com.br](ritchie@zup.com.br). All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq) 77 | -------------------------------------------------------------------------------- /.github/workflows/assert-command-line-output.yml: -------------------------------------------------------------------------------- 1 | name: Assert Command Line Output 2 | 3 | on: 4 | push: 5 | workflow_dispatch: 6 | 7 | jobs: 8 | 9 | # On UBUNTU runners 10 | PASSED-assert-file-ubuntu: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 15 | with: 16 | command_line: cat README.md 17 | assert_file_path: README.md 18 | expected_result: PASSED 19 | 20 | FAILED-assert-file-ubuntu: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - uses: actions/checkout@v4 24 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 25 | with: 26 | command_line: ls -lha 27 | assert_file_path: assert.txt 28 | expected_result: FAILED 29 | 30 | PASSED-specific-line-ubuntu: 31 | runs-on: ubuntu-latest 32 | steps: 33 | - uses: actions/checkout@v4 34 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 35 | with: 36 | command_line: cat README.md 37 | assert_file_path: README.md 38 | expected_result: PASSED 39 | specific_line: 1 40 | 41 | FAILED-specific-line-ubuntu: 42 | runs-on: ubuntu-latest 43 | steps: 44 | - uses: actions/checkout@v4 45 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 46 | with: 47 | command_line: ls -lha 48 | assert_file_path: assert.txt 49 | expected_result: FAILED 50 | specific_line: 2 51 | 52 | PASSED-contains-ubuntu: 53 | runs-on: ubuntu-latest 54 | steps: 55 | - uses: actions/checkout@v4 56 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 57 | with: 58 | command_line: ls -lha 59 | contains: runner 60 | expected_result: PASSED 61 | 62 | FAILED-contains-ubuntu: 63 | runs-on: ubuntu-latest 64 | steps: 65 | - uses: actions/checkout@v4 66 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 67 | with: 68 | command_line: ls -lha 69 | contains: error 70 | expected_result: FAILED 71 | 72 | # On MACOS runners 73 | PASSED-assert-file-macos: 74 | runs-on: macos-latest 75 | steps: 76 | - uses: actions/checkout@v4 77 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 78 | with: 79 | command_line: cat README.md 80 | assert_file_path: README.md 81 | expected_result: PASSED 82 | 83 | FAILED-assert-file-macos: 84 | runs-on: macos-latest 85 | steps: 86 | - uses: actions/checkout@v4 87 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 88 | with: 89 | command_line: ls -lha 90 | assert_file_path: assert.txt 91 | expected_result: FAILED 92 | 93 | PASSED-specific-line-macos: 94 | runs-on: macos-latest 95 | steps: 96 | - uses: actions/checkout@v4 97 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 98 | with: 99 | command_line: cat README.md 100 | assert_file_path: README.md 101 | expected_result: PASSED 102 | specific_line: 1 103 | 104 | FAILED-specific-line-macos: 105 | runs-on: macos-latest 106 | steps: 107 | - uses: actions/checkout@v4 108 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 109 | with: 110 | command_line: ls -lha 111 | assert_file_path: assert.txt 112 | expected_result: FAILED 113 | specific_line: 2 114 | 115 | PASSED-contains-macos: 116 | runs-on: macos-latest 117 | steps: 118 | - uses: actions/checkout@v4 119 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 120 | with: 121 | command_line: ls -lha 122 | contains: runner 123 | expected_result: PASSED 124 | 125 | FAILED-contains-macos: 126 | runs-on: macos-latest 127 | steps: 128 | - uses: actions/checkout@v4 129 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 130 | with: 131 | command_line: ls -lha 132 | contains: error 133 | expected_result: FAILED 134 | 135 | # On WINDOWS runners 136 | PASSED-assert-file-windows: 137 | runs-on: windows-latest 138 | steps: 139 | - uses: actions/checkout@v4 140 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 141 | with: 142 | command_line: cat README.md 143 | assert_file_path: README.md 144 | expected_result: PASSED 145 | 146 | FAILED-assert-file-windows: 147 | runs-on: windows-latest 148 | steps: 149 | - uses: actions/checkout@v4 150 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 151 | with: 152 | command_line: ls -lha 153 | assert_file_path: assert.txt 154 | expected_result: FAILED 155 | 156 | PASSED-specific-line-windows: 157 | runs-on: windows-latest 158 | steps: 159 | - uses: actions/checkout@v4 160 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 161 | with: 162 | command_line: cat README.md 163 | assert_file_path: README.md 164 | expected_result: PASSED 165 | specific_line: 1 166 | 167 | FAILED-specific-line-windows: 168 | runs-on: windows-latest 169 | steps: 170 | - uses: actions/checkout@v4 171 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 172 | with: 173 | command_line: ls -lha 174 | assert_file_path: assert.txt 175 | expected_result: FAILED 176 | specific_line: 2 177 | 178 | PASSED-contains-windows: 179 | runs-on: windows-latest 180 | steps: 181 | - uses: actions/checkout@v4 182 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 183 | with: 184 | command_line: ls -lha 185 | contains: runner 186 | expected_result: PASSED 187 | 188 | FAILED-contains-windows: 189 | runs-on: windows-latest 190 | steps: 191 | - uses: actions/checkout@v4 192 | - uses: GuillaumeFalourd/assert-command-line-output@v2.3 193 | with: 194 | command_line: ls -lha 195 | contains: error 196 | expected_result: FAILED 197 | -------------------------------------------------------------------------------- /.github/workflows/env-vars.yml: -------------------------------------------------------------------------------- 1 | name: Env Vars 2 | 3 | on: [push] 4 | 5 | jobs: 6 | linux: 7 | name: Linux Demo 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: FranzDiebold/github-env-vars-action@v2 11 | - name: Print environment variables exposed by this action 12 | run: | 13 | echo "CI_REPOSITORY_SLUG=$CI_REPOSITORY_SLUG" 14 | echo "CI_REPOSITORY_OWNER=$CI_REPOSITORY_OWNER" 15 | echo "CI_REPOSITORY_OWNER_SLUG=$CI_REPOSITORY_OWNER_SLUG" 16 | echo "CI_REPOSITORY_NAME=$CI_REPOSITORY_NAME" 17 | echo "CI_REPOSITORY_NAME_SLUG=$CI_REPOSITORY_NAME_SLUG" 18 | echo "CI_REPOSITORY=$CI_REPOSITORY" 19 | echo "CI_REF_SLUG=$CI_REF_SLUG" 20 | echo "CI_ACTION_REF_NAME=$CI_ACTION_REF_NAME" 21 | echo "CI_ACTION_REF_NAME_SLUG=$CI_ACTION_REF_NAME_SLUG" 22 | echo "CI_REF_NAME=$CI_REF_NAME" 23 | echo "CI_REF_NAME_SLUG=$CI_REF_NAME_SLUG" 24 | echo "CI_REF=$CI_REF" 25 | echo "CI_HEAD_REF_SLUG=$CI_HEAD_REF_SLUG" 26 | echo "CI_HEAD_REF=$CI_HEAD_REF" 27 | echo "CI_BASE_REF_SLUG=$CI_BASE_REF_SLUG" 28 | echo "CI_BASE_REF=$CI_BASE_REF" 29 | echo "CI_SHA_SHORT=$CI_SHA_SHORT" 30 | echo "CI_SHA=$CI_SHA" 31 | echo "CI_ACTOR=$CI_ACTOR" 32 | echo "CI_EVENT_NAME=$CI_EVENT_NAME" 33 | echo "CI_RUN_ID=$CI_RUN_ID" 34 | echo "CI_RUN_NUMBER=$CI_RUN_NUMBER" 35 | echo "CI_WORKFLOW=$CI_WORKFLOW" 36 | echo "CI_ACTION=$CI_ACTION" 37 | - name: Print environment variables exposed by GitHub 38 | run: | 39 | echo "GITHUB_ACTOR=$GITHUB_ACTOR" 40 | echo "GITHUB_REPOSITORY=$GITHUB_REPOSITORY" 41 | echo "GITHUB_SHA=$GITHUB_SHA" 42 | echo "GITHUB_REF=$GITHUB_REF" 43 | echo "GITHUB_HEAD_REF=$GITHUB_HEAD_REF" 44 | echo "GITHUB_BASE_REF=$GITHUB_BASE_REF" 45 | echo "GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME" 46 | echo "GITHUB_RUN_ID=$GITHUB_RUN_ID" 47 | echo "GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER" 48 | echo "GITHUB_WORKFLOW=$GITHUB_WORKFLOW" 49 | echo "GITHUB_ACTION=$GITHUB_ACTION" 50 | windows: 51 | name: Windows Demo 52 | runs-on: windows-latest 53 | steps: 54 | - uses: FranzDiebold/github-env-vars-action@v2 55 | - name: Print environment variables exposed by this action 56 | run: | 57 | echo "CI_REPOSITORY_SLUG=$Env:CI_REPOSITORY_SLUG" 58 | echo "CI_REPOSITORY_OWNER=$Env:CI_REPOSITORY_OWNER" 59 | echo "CI_REPOSITORY_OWNER_SLUG=$Env:CI_REPOSITORY_OWNER_SLUG" 60 | echo "CI_REPOSITORY_NAME=$Env:CI_REPOSITORY_NAME" 61 | echo "CI_REPOSITORY_NAME_SLUG=$Env:CI_REPOSITORY_NAME_SLUG" 62 | echo "CI_REPOSITORY=$Env:CI_REPOSITORY" 63 | echo "CI_REF_SLUG=$Env:CI_REF_SLUG" 64 | echo "CI_ACTION_REF_NAME=$Env:CI_ACTION_REF_NAME" 65 | echo "CI_ACTION_REF_NAME_SLUG=$Env:CI_ACTION_REF_NAME_SLUG" 66 | echo "CI_REF_NAME=$Env:CI_REF_NAME" 67 | echo "CI_REF_NAME_SLUG=$Env:CI_REF_NAME_SLUG" 68 | echo "CI_REF=$Env:CI_REF" 69 | echo "CI_HEAD_REF_SLUG=$Env:CI_HEAD_REF_SLUG" 70 | echo "CI_HEAD_REF=$Env:CI_HEAD_REF" 71 | echo "CI_BASE_REF_SLUG=$Env:CI_BASE_REF_SLUG" 72 | echo "CI_BASE_REF=$Env:CI_BASE_REF" 73 | echo "CI_SHA_SHORT=$Env:CI_SHA_SHORT" 74 | echo "CI_SHA=$Env:CI_SHA" 75 | echo "CI_ACTOR=$Env:CI_ACTOR" 76 | echo "CI_EVENT_NAME=$Env:CI_EVENT_NAME" 77 | echo "CI_RUN_ID=$Env:CI_RUN_ID" 78 | echo "CI_RUN_NUMBER=$Env:CI_RUN_NUMBER" 79 | echo "CI_WORKFLOW=$Env:CI_WORKFLOW" 80 | echo "CI_ACTION=$Env:CI_ACTION" 81 | - name: Print environment variables exposed by GitHub 82 | run: | 83 | echo "GITHUB_ACTOR=$Env:GITHUB_ACTOR" 84 | echo "GITHUB_REPOSITORY=$Env:GITHUB_REPOSITORY" 85 | echo "GITHUB_SHA=$Env:GITHUB_SHA" 86 | echo "GITHUB_REF=$Env:GITHUB_REF" 87 | echo "GITHUB_HEAD_REF=$Env:GITHUB_HEAD_REF" 88 | echo "GITHUB_BASE_REF=$Env:GITHUB_BASE_REF" 89 | echo "GITHUB_EVENT_NAME=$Env:GITHUB_EVENT_NAME" 90 | echo "GITHUB_RUN_ID=$Env:GITHUB_RUN_ID" 91 | echo "GITHUB_RUN_NUMBER=$Env:GITHUB_RUN_NUMBER" 92 | echo "GITHUB_WORKFLOW=$Env:GITHUB_WORKFLOW" 93 | echo "GITHUB_ACTION=$Env:GITHUB_ACTION" 94 | macos: 95 | name: macOS Demo 96 | runs-on: macos-latest 97 | steps: 98 | - uses: FranzDiebold/github-env-vars-action@v2 99 | - name: Print environment variables exposed by this action 100 | run: | 101 | echo "CI_REPOSITORY_SLUG=$CI_REPOSITORY_SLUG" 102 | echo "CI_REPOSITORY_OWNER=$CI_REPOSITORY_OWNER" 103 | echo "CI_REPOSITORY_OWNER_SLUG=$CI_REPOSITORY_OWNER_SLUG" 104 | echo "CI_REPOSITORY_NAME=$CI_REPOSITORY_NAME" 105 | echo "CI_REPOSITORY_NAME_SLUG=$CI_REPOSITORY_NAME_SLUG" 106 | echo "CI_REPOSITORY=$CI_REPOSITORY" 107 | echo "CI_REF_SLUG=$CI_REF_SLUG" 108 | echo "CI_ACTION_REF_NAME=$CI_ACTION_REF_NAME" 109 | echo "CI_ACTION_REF_NAME_SLUG=$CI_ACTION_REF_NAME_SLUG" 110 | echo "CI_REF_NAME=$CI_REF_NAME" 111 | echo "CI_REF_NAME_SLUG=$CI_REF_NAME_SLUG" 112 | echo "CI_REF=$CI_REF" 113 | echo "CI_HEAD_REF_SLUG=$CI_HEAD_REF_SLUG" 114 | echo "CI_HEAD_REF=$CI_HEAD_REF" 115 | echo "CI_BASE_REF_SLUG=$CI_BASE_REF_SLUG" 116 | echo "CI_BASE_REF=$CI_BASE_REF" 117 | echo "CI_SHA_SHORT=$CI_SHA_SHORT" 118 | echo "CI_SHA=$CI_SHA" 119 | echo "CI_ACTOR=$CI_ACTOR" 120 | echo "CI_EVENT_NAME=$CI_EVENT_NAME" 121 | echo "CI_RUN_ID=$CI_RUN_ID" 122 | echo "CI_RUN_NUMBER=$CI_RUN_NUMBER" 123 | echo "CI_WORKFLOW=$CI_WORKFLOW" 124 | echo "CI_ACTION=$CI_ACTION" 125 | - name: Print environment variables exposed by GitHub 126 | run: | 127 | echo "GITHUB_ACTOR=$GITHUB_ACTOR" 128 | echo "GITHUB_REPOSITORY=$GITHUB_REPOSITORY" 129 | echo "GITHUB_SHA=$GITHUB_SHA" 130 | echo "GITHUB_REF=$GITHUB_REF" 131 | echo "GITHUB_HEAD_REF=$GITHUB_HEAD_REF" 132 | echo "GITHUB_BASE_REF=$GITHUB_BASE_REF" 133 | echo "GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME" 134 | echo "GITHUB_RUN_ID=$GITHUB_RUN_ID" 135 | echo "GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER" 136 | echo "GITHUB_WORKFLOW=$GITHUB_WORKFLOW" 137 | echo "GITHUB_ACTION=$GITHUB_ACTION" -------------------------------------------------------------------------------- /.github/workflows/github-environment-variables.yml: -------------------------------------------------------------------------------- 1 | name: Github Environment Variables 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | linux: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: FranzDiebold/github-env-vars-action@v2 10 | - name: Print environment variables exposed by this action 11 | run: | 12 | echo "CI_REPOSITORY_SLUG=$CI_REPOSITORY_SLUG" 13 | echo "CI_REPOSITORY_OWNER=$CI_REPOSITORY_OWNER" 14 | echo "CI_REPOSITORY_OWNER_SLUG=$CI_REPOSITORY_OWNER_SLUG" 15 | echo "CI_REPOSITORY_NAME=$CI_REPOSITORY_NAME" 16 | echo "CI_REPOSITORY_NAME_SLUG=$CI_REPOSITORY_NAME_SLUG" 17 | echo "CI_REPOSITORY=$CI_REPOSITORY" 18 | echo "CI_REF_SLUG=$CI_REF_SLUG" 19 | echo "CI_ACTION_REF_NAME=$CI_ACTION_REF_NAME" 20 | echo "CI_ACTION_REF_NAME_SLUG=$CI_ACTION_REF_NAME_SLUG" 21 | echo "CI_REF_NAME=$CI_REF_NAME" 22 | echo "CI_REF_NAME_SLUG=$CI_REF_NAME_SLUG" 23 | echo "CI_REF=$CI_REF" 24 | echo "CI_HEAD_REF_SLUG=$CI_HEAD_REF_SLUG" 25 | echo "CI_HEAD_REF=$CI_HEAD_REF" 26 | echo "CI_BASE_REF_SLUG=$CI_BASE_REF_SLUG" 27 | echo "CI_BASE_REF=$CI_BASE_REF" 28 | echo "CI_SHA_SHORT=$CI_SHA_SHORT" 29 | echo "CI_SHA=$CI_SHA" 30 | echo "CI_PR_TITLE=$CI_PR_TITLE" 31 | echo "CI_PR_DESCRIPTION=$CI_PR_DESCRIPTION" 32 | echo "CI_ACTOR=$CI_ACTOR" 33 | echo "CI_EVENT_NAME=$CI_EVENT_NAME" 34 | echo "CI_RUN_ID=$CI_RUN_ID" 35 | echo "CI_RUN_NUMBER=$CI_RUN_NUMBER" 36 | echo "CI_WORKFLOW=$CI_WORKFLOW" 37 | echo "CI_ACTION=$CI_ACTION" 38 | - name: Print environment variables exposed by GitHub 39 | run: | 40 | echo "GITHUB_ACTOR=$GITHUB_ACTOR" 41 | echo "GITHUB_REPOSITORY=$GITHUB_REPOSITORY" 42 | echo "GITHUB_SHA=$GITHUB_SHA" 43 | echo "GITHUB_REF=$GITHUB_REF" 44 | echo "GITHUB_HEAD_REF=$GITHUB_HEAD_REF" 45 | echo "GITHUB_BASE_REF=$GITHUB_BASE_REF" 46 | echo "GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME" 47 | echo "GITHUB_RUN_ID=$GITHUB_RUN_ID" 48 | echo "GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER" 49 | echo "GITHUB_WORKFLOW=$GITHUB_WORKFLOW" 50 | echo "GITHUB_ACTION=$GITHUB_ACTION" 51 | 52 | windows: 53 | runs-on: windows-latest 54 | steps: 55 | - uses: FranzDiebold/github-env-vars-action@v2 56 | - name: Print environment variables exposed by this action 57 | run: | 58 | echo "CI_REPOSITORY_SLUG=$Env:CI_REPOSITORY_SLUG" 59 | echo "CI_REPOSITORY_OWNER=$Env:CI_REPOSITORY_OWNER" 60 | echo "CI_REPOSITORY_OWNER_SLUG=$Env:CI_REPOSITORY_OWNER_SLUG" 61 | echo "CI_REPOSITORY_NAME=$Env:CI_REPOSITORY_NAME" 62 | echo "CI_REPOSITORY_NAME_SLUG=$Env:CI_REPOSITORY_NAME_SLUG" 63 | echo "CI_REPOSITORY=$Env:CI_REPOSITORY" 64 | echo "CI_REF_SLUG=$Env:CI_REF_SLUG" 65 | echo "CI_ACTION_REF_NAME=$Env:CI_ACTION_REF_NAME" 66 | echo "CI_ACTION_REF_NAME_SLUG=$Env:CI_ACTION_REF_NAME_SLUG" 67 | echo "CI_REF_NAME=$Env:CI_REF_NAME" 68 | echo "CI_REF_NAME_SLUG=$Env:CI_REF_NAME_SLUG" 69 | echo "CI_REF=$Env:CI_REF" 70 | echo "CI_HEAD_REF_SLUG=$Env:CI_HEAD_REF_SLUG" 71 | echo "CI_HEAD_REF=$Env:CI_HEAD_REF" 72 | echo "CI_BASE_REF_SLUG=$Env:CI_BASE_REF_SLUG" 73 | echo "CI_BASE_REF=$Env:CI_BASE_REF" 74 | echo "CI_SHA_SHORT=$Env:CI_SHA_SHORT" 75 | echo "CI_SHA=$Env:CI_SHA" 76 | echo "CI_PR_TITLE=$Env:CI_PR_TITLE" 77 | echo "CI_PR_DESCRIPTION=$Env:CI_PR_DESCRIPTION" 78 | echo "CI_ACTOR=$Env:CI_ACTOR" 79 | echo "CI_EVENT_NAME=$Env:CI_EVENT_NAME" 80 | echo "CI_RUN_ID=$Env:CI_RUN_ID" 81 | echo "CI_RUN_NUMBER=$Env:CI_RUN_NUMBER" 82 | echo "CI_WORKFLOW=$Env:CI_WORKFLOW" 83 | echo "CI_ACTION=$Env:CI_ACTION" 84 | - name: Print environment variables exposed by GitHub 85 | run: | 86 | echo "GITHUB_ACTOR=$Env:GITHUB_ACTOR" 87 | echo "GITHUB_REPOSITORY=$Env:GITHUB_REPOSITORY" 88 | echo "GITHUB_SHA=$Env:GITHUB_SHA" 89 | echo "GITHUB_REF=$Env:GITHUB_REF" 90 | echo "GITHUB_HEAD_REF=$Env:GITHUB_HEAD_REF" 91 | echo "GITHUB_BASE_REF=$Env:GITHUB_BASE_REF" 92 | echo "GITHUB_EVENT_NAME=$Env:GITHUB_EVENT_NAME" 93 | echo "GITHUB_RUN_ID=$Env:GITHUB_RUN_ID" 94 | echo "GITHUB_RUN_NUMBER=$Env:GITHUB_RUN_NUMBER" 95 | echo "GITHUB_WORKFLOW=$Env:GITHUB_WORKFLOW" 96 | echo "GITHUB_ACTION=$Env:GITHUB_ACTION" 97 | 98 | macos: 99 | runs-on: macos-latest 100 | steps: 101 | - uses: FranzDiebold/github-env-vars-action@v2 102 | - name: Print environment variables exposed by this action 103 | run: | 104 | echo "CI_REPOSITORY_SLUG=$CI_REPOSITORY_SLUG" 105 | echo "CI_REPOSITORY_OWNER=$CI_REPOSITORY_OWNER" 106 | echo "CI_REPOSITORY_OWNER_SLUG=$CI_REPOSITORY_OWNER_SLUG" 107 | echo "CI_REPOSITORY_NAME=$CI_REPOSITORY_NAME" 108 | echo "CI_REPOSITORY_NAME_SLUG=$CI_REPOSITORY_NAME_SLUG" 109 | echo "CI_REPOSITORY=$CI_REPOSITORY" 110 | echo "CI_REF_SLUG=$CI_REF_SLUG" 111 | echo "CI_ACTION_REF_NAME=$CI_ACTION_REF_NAME" 112 | echo "CI_ACTION_REF_NAME_SLUG=$CI_ACTION_REF_NAME_SLUG" 113 | echo "CI_REF_NAME=$CI_REF_NAME" 114 | echo "CI_REF_NAME_SLUG=$CI_REF_NAME_SLUG" 115 | echo "CI_REF=$CI_REF" 116 | echo "CI_HEAD_REF_SLUG=$CI_HEAD_REF_SLUG" 117 | echo "CI_HEAD_REF=$CI_HEAD_REF" 118 | echo "CI_BASE_REF_SLUG=$CI_BASE_REF_SLUG" 119 | echo "CI_BASE_REF=$CI_BASE_REF" 120 | echo "CI_SHA_SHORT=$CI_SHA_SHORT" 121 | echo "CI_SHA=$CI_SHA" 122 | echo "CI_PR_TITLE=$CI_PR_TITLE" 123 | echo "CI_PR_DESCRIPTION=$CI_PR_DESCRIPTION" 124 | echo "CI_ACTOR=$CI_ACTOR" 125 | echo "CI_EVENT_NAME=$CI_EVENT_NAME" 126 | echo "CI_RUN_ID=$CI_RUN_ID" 127 | echo "CI_RUN_NUMBER=$CI_RUN_NUMBER" 128 | echo "CI_WORKFLOW=$CI_WORKFLOW" 129 | echo "CI_ACTION=$CI_ACTION" 130 | - name: Print environment variables exposed by GitHub 131 | run: | 132 | echo "GITHUB_ACTOR=$GITHUB_ACTOR" 133 | echo "GITHUB_REPOSITORY=$GITHUB_REPOSITORY" 134 | echo "GITHUB_SHA=$GITHUB_SHA" 135 | echo "GITHUB_REF=$GITHUB_REF" 136 | echo "GITHUB_HEAD_REF=$GITHUB_HEAD_REF" 137 | echo "GITHUB_BASE_REF=$GITHUB_BASE_REF" 138 | echo "GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME" 139 | echo "GITHUB_RUN_ID=$GITHUB_RUN_ID" 140 | echo "GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER" 141 | echo "GITHUB_WORKFLOW=$GITHUB_WORKFLOW" 142 | echo "GITHUB_ACTION=$GITHUB_ACTION" -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2021 Guillaume Falourd 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # useful-actions 2 | 3 | ![title](/useful-github-actions.png) 4 | 5 | This repository lists some useful generic Actions to use in your Github workflows and repositories. 6 | 7 | ## Summary 8 | 9 | - [Good to Know](https://github.com/GuillaumeFalourd/useful-actions#-good-to-know) 10 | - [Useful Actions](https://github.com/GuillaumeFalourd/useful-actions#-useful-actions) 11 | - [Global Actions](https://github.com/GuillaumeFalourd/useful-actions#-global-actions) 12 | - [Docker Actions](https://github.com/GuillaumeFalourd/useful-actions#-docker-actions) 13 | - [Other Tools Actions](https://github.com/GuillaumeFalourd/useful-actions#-other-tools-actions) 14 | - [How to create new actions](https://github.com/GuillaumeFalourd/useful-actions#-how-to-create-new-actions) 15 | - [How to debug workflows](https://github.com/GuillaumeFalourd/useful-actions#%EF%B8%8F-how-to-debug-workflows) 16 | - [How to test actions locally](https://github.com/GuillaumeFalourd/useful-actions#-how-to-test-actions-locally) 17 | - [Contribution](CONTRIBUTING.md) 18 | 19 | *** 20 | 21 | ## 💡 Good To Know 22 | 23 | - [Usage Limits](https://docs.github.com/en/actions/reference/usage-limits-billing-and-administration) 24 | - [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions) 25 | - [Authentication in a workflow](https://docs.github.com/en/actions/reference/authentication-in-a-workflow) 26 | - [Creating a personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) 27 | 28 | *** 29 | 30 | ## 🔎 Useful Actions 31 | 32 | *** 33 | 34 | ## 🌐 Global Actions 35 | 36 | [![Action Cond](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/action-cond.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/action-cond.yml) 37 | 38 | [Action Cond](https://github.com/marketplace/actions/conditional-value-for-github-action): GitHub Action to use a `if-else` operation when needed, to set dynamic configuration of other steps. 39 | 40 | [![Add Label](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/add-label.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/add-label.yml) 41 | 42 | [Add Label](https://github.com/marketplace/actions/actions-ecosystem-add-labels): GitHub Action to add GitHub labels to an issue or a pull request. 43 | 44 | [![Add Reviewers](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/add-reviewers.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/add-reviewers.yml) 45 | 46 | [Add Reviewers](https://github.com/marketplace/actions/add-reviewers): Github action that adds Reviewers to the Pull Request. 47 | 48 | [![App Token](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/app-token.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/app-token.yml) 49 | 50 | [App Token](https://github.com/marketplace/actions/github-app-token): Github Action to impersonate a GitHub App when `secrets.GITHUB_TOKEN`'s limitations are too restrictive and a personal access token is not suitable. 51 | 52 | [![Assert command line output](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/assert-command-line-output.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/assert-command-line-output.yml) 53 | 54 | [Assert command line output](https://github.com/marketplace/actions/assert-command-line-output): Github Action to assert / check a command line output. 55 | 56 | [![Auto Accept Collabs](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-accept-collabs.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-accept-collabs.yml) 57 | 58 | [Auto Accept Collabs](https://github.com/marketplace/actions/auto-accept-collabs): Github Action to accept automatically all collaboration invites. Useful for a bot account. 59 | 60 | [![Auto approve](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-approve.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-approve.yml) 61 | 62 | [Auto Approve](https://github.com/marketplace/actions/auto-approve): Github Action to automatically approve pull requests. 63 | 64 | [![Auto Assign](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-assign.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-assign.yml) 65 | 66 | [Auto Assign](https://github.com/marketplace/actions/auto-assign-action): Github Action to add reviewers and assignees to a pull request when opened (needs [auto_assign.yml](https://github.com/GuillaumeFalourd/useful-actions/actions/auto_assign.yml) configuration file). 67 | 68 | [![Auto Assign Author](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-assign-author.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-assign-author.yml) 69 | 70 | [Auto Assign Author](https://github.com/marketplace/actions/auto-author-assign): Github Action to automatically assigns PR author as an assignee. 71 | 72 | [![Auto merge](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-merge.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/auto-merge.yml) 73 | 74 | [Auto Merge](https://github.com/marketplace/actions/merge-pull-requests): GitHub Action to automatically merge pull requests when they are ready (`automerged` label). 75 | 76 | [![Branch Names](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/branch-names.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/branch-names.yml) 77 | 78 | [Branch Names](https://github.com/marketplace/actions/branch-names): Github Action to get branch or tag information without the `/ref/*` prefix. 79 | 80 | [![Cache](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/cache.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/cache.yml) 81 | 82 | [Cache](https://github.com/marketplace/actions/cache): Github Action to cache dependencies and build outputs to improve workflow execution time. 83 | 84 | [![Cancel Workflow](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/cancel-workflow.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/cancel-workflow.yml) 85 | 86 | [Cancel Workflow](https://github.com/marketplace/actions/cancel-workflow-action): Github Action cancel any previous runs that are not `completed` for a given workflow. This includes runs with a status of `queued` or `in_progress`. 87 | 88 | [![Changed Files](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/changed-files.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/changed-files.yml) 89 | 90 | [Changed Files](https://github.com/marketplace/actions/changed-files): Github Action to retrieve all changed files relative to the default branch (`pull_request*` based events) or the last remote commit (`push` based event) returning the **absolute path** to all changed files from the project root. 91 | 92 | [![Checkout](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/checkout.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/checkout.yml) 93 | 94 | [Checkout](https://github.com/marketplace/actions/checkout): Github Action to checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it. 95 | 96 | [![Close Pull Request](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/close-pull-request.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/close-pull-request.yml) 97 | 98 | [Close Pull Request](https://github.com/marketplace/actions/close-pull-request): Github Action to automatically close a pull request (for example if modifying _untouchable files_). 99 | 100 | [![Commit And Push](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/commit-and-push.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/commit-and-push.yml) 101 | 102 | [Commit And Push](https://github.com/marketplace/actions/git-commit-and-push): Github Action to commit and push new code to the repository. 103 | 104 | [![Compress Images](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/compress-image.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/compress-image.yml) 105 | 106 | [Compress Images](https://github.com/marketplace/actions/image-actions): Github Action to automatically compresses JPEGs, PNGs and WebPs in Pull Requests. 107 | 108 | [![Copycat](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/copycat.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/copycat.yml) 109 | 110 | [Copycat](https://github.com/marketplace/actions/copycat-action): GitHub Action to copy files from your repository to another external repository. It is also possible to copy files from/to repository Wikis. 111 | 112 | [![Create JSON](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/create-json.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/create-json.yml) 113 | 114 | [Create JSON](https://github.com/marketplace/actions/create-json): GitHub Action to create a .json file dynamically on your workflow. 115 | 116 | [![Create Pull Request](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/create-pull-request.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/create-pull-request.yml) 117 | 118 | [Create Pull Request](https://github.com/marketplace/actions/create-pull-request): GitHub Action to create a pull request for changes to your repository in the actions workspace. 119 | 120 | [![Curl](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/curl.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/curl.yml) 121 | 122 | [Curl](https://github.com/marketplace/actions/github-action-for-curl): GitHub Action to use the curl CLI to perform http requests. 123 | 124 | [![Debug](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/debug.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/debug.yml) 125 | 126 | [Debug](https://github.com/marketplace/actions/debug-action): GitHub Action to print the environment variables and the event payload. Useful for developing or debugging GitHub Actions. 127 | 128 | [![Delete Artifacts](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/delete-artifact.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/delete-artifact.yml) 129 | 130 | [Delete Artifacts](https://github.com/marketplace/actions/delete-artifact): GitHub Action to delete artifacts within a workflow run. This can be useful when artifacts are shared across jobs, but are no longer needed when the workflow is complete. 131 | 132 | [![Enforce PR labels](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/enforce-labels.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/enforce-labels.yml) 133 | 134 | [Enforce PR labels](https://github.com/marketplace/actions/enforce-pr-labels): GitHub Action to enforce assigning labels before merging PR's. Useful for generating automatic changelog and release notes with `github-release-notes`. 135 | 136 | [![Env Vars](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/env-vars.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/env-vars.yml) 137 | 138 | [Env Vars](https://github.com/marketplace/actions/github-environment-variables-action): GitHub Action to expose useful environment variables. 139 | 140 | [![File Existence](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/file-existence.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/file-existence.yml) 141 | 142 | [File Existence](https://github.com/marketplace/actions/file-existence): Github Action to check if files exists or not. 143 | 144 | [![First Interaction](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/first-interaction.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/first-interaction.yml) 145 | 146 | [First Interaction](https://github.com/marketplace/actions/first-interaction): Github Action to filter pull requests and issues from first-time contributors. 147 | 148 | [![Get Workflow Origin](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/get-workflow-origin.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/get-workflow-origin.yml) [![Get Workflow Origin Information](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/get-workflow-origin-run.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/get-workflow-origin-run.yml) 149 | 150 | [Get Workflow Origin](https://github.com/potiuk/get-workflow-origin): Github Action to provide information about the pull requests that triggered the workflow for the `pull_request` and `pull_request_review` events or for the `workflow_run` event that is triggered by one of those events. 151 | 152 | [![GHAction Dump Context](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/ghaction-dump-context.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/ghaction-dump-context.yml) 153 | 154 | [GHAction Dump Context](https://github.com/marketplace/actions/dump-context): GitHub Action to dump context of your workflow (which allows to check all variables available using the `github.event` syntax in the workflow). 155 | 156 | [![GHAction Github Status](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/ghaction-github-status.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/ghaction-github-status.yml) 157 | 158 | [GHAction Github Status](https://github.com/marketplace/actions/github-status): GitHub Action to check [GitHub Status](https://www.githubstatus.com/) in workflows, allowinf to trigger error if GitHub services are down. 159 | 160 | [![Git Auto Commit](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/git-auto-commit.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/git-auto-commit.yml) 161 | 162 | [Git Auto Commit](https://github.com/marketplace/actions/git-auto-commit): GitHub Action to detect changed files during a Workflow run and to commit and push them back to the GitHub repository. By default, the commit is made in the name of "GitHub Actions" and co-authored by the user that made the last commit. 163 | 164 | [![Github Environment Variables](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/github-environment-variables.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/github-environment-variables.yml) 165 | 166 | [Github Environment Variables](https://github.com/marketplace/actions/github-environment-variables-action): GitHub Action to expose useful environment variables. 167 | 168 | [![Github Script](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/github-script.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/github-script.yml) 169 | 170 | [Github Script](https://github.com/marketplace/actions/github-script): Github Action to make it easy to quickly write a script in your workflow that uses the GitHub API and the workflow run context. 171 | 172 | [![Gitleaks](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/gitleaks.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/gitleaks.yml) 173 | 174 | [Gitleaks](https://github.com/marketplace/actions/gitleaks): Github Action to detect hardcoded secrets like passwords, api keys, and tokens in git repos. 175 | 176 | [![GPT Review](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/gpt-review.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/gpt-review.yml) 177 | 178 | [GPT Review](https://github.com/marketplace/actions/chat-gpt-code-peer-review): Github Action enabling automatic code reviewing in your repository by sending the git diff patches between a head ref and a base ref to OpenAI's API for annotation using Chat GPT (needs [OpenAi API Key](https://www.maisieai.com/help/how-to-get-an-openai-api-key-for-chatgpt)). 179 | 180 | [![Horusec](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/horusec.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/horusec.yml) 181 | 182 | [Horusec](https://github.com/marketplace/actions/horusec): Github Action to identify vulnerabilities in your project. 183 | 184 | [![Manual Approval](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/manual-approval.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/manual-approval.yml) 185 | 186 | [Manual Approval](https://github.com/marketplace/actions/manual-workflow-approval): Github Action to pause a workflow and require manual approval from **one or more** approvers before continuing. 187 | 188 | [![Paths Filter](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/paths-filter.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/paths-filter.yml) 189 | 190 | [Paths Filter](https://github.com/marketplace/actions/paths-changes-filter): Github Action that enables conditional execution of workflow steps and jobs, based on the files modified by pull request, on a feature branch, or by the recently pushed commits. 191 | 192 | [![Pull Request](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/pull-request.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/pull-request.yml) 193 | 194 | [Pull Request](https://github.com/marketplace/actions/github-pull-request-action): GitHub Action to create pull requests automatically. 195 | 196 | [![Purge Artifacts](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/purge-artifacts.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/purge-artifacts.yml) 197 | 198 | [Purge Artifacts](https://github.com/marketplace/actions/purge-artifacts): Github Action responsible for deleting old artifacts by setting expire duration. 199 | 200 | [![Read File](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/read-file.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/read-file.yml) 201 | 202 | [Read File](https://github.com/marketplace/actions/read-file): Github Action to read file contents. 203 | 204 | [![Recreate Release](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/recreate-release.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/recreate-release.yml) 205 | 206 | [Recreate Release](https://github.com/GongT/actions-recreate-release): Github Action to delete previous release by `tag_name` or `release_name` and then call `actions/create-release` to create it again. 207 | 208 | [![Release](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/release.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/release.yml) 209 | 210 | [Release](https://github.com/marketplace/actions/gh-release): GitHub Action for creating GitHub Releases on Linux, Windows, and macOS virtual environments. 211 | 212 | [![Replace Token](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/replace-token.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/replace-token.yml) 213 | 214 | [Replace Token](https://github.com/marketplace/actions/replace-tokens): GitHub Action for replacing tokens in files. 215 | 216 | [![Replace Values Action](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/replace-values-action.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/replace-values-action.yml): Github Action to replace values in files (secrets or fields). 217 | 218 | [![Repository-Dispatch](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/repository-dispatch.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/repository-dispatch.yml) [![Repository-Dispatch-Triggered](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/repository-dispatch-triggered.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/repository-dispatch-triggered.yml) 219 | 220 | [Repository-Dispatch](https://github.com/marketplace/actions/repository-dispatch): GitHub Action to create a repository dispatch event. 221 | 222 | [![Retry Action](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/retry-action.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/retry-action.yml) 223 | 224 | [Retry Action](https://github.com/marketplace/actions/retry-action): GitHub Action to rerun another GitHub Actions and commands. 225 | 226 | [![Set Secrets](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/set-secrets.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/set-secrets.yml) 227 | 228 | [Set Secrets](https://github.com/marketplace/actions/set-action-secret): Github Action to Create or edit actions secrets in repository or organizations. 229 | 230 | Example 231 | 232 | [![Skip duplicate](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/skip-duplicate.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/skip-duplicate.yml) 233 | 234 | [Skip duplicate](https://github.com/marketplace/actions/skip-duplicate-actions): GitHub Action to skip duplicate workflow-runs (after merges, pull requests or similar), skip concurrent or parallel workflow-runs for things that you do not want to run twice, skip ignored paths to speedup documentation-changes or similar, skip if paths not changed for something like directory-specific tests, cancel outdated workflow-runs after branch-pushes. 235 | 236 | [![Stale](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/stale.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/stale.yml) 237 | 238 | [Stale](https://github.com/marketplace/actions/close-stale-issues): GitHub Action to warn and then close issues and PRs that have had no activity for a specified amount of time. 239 | 240 | [![Super Linter](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/super-linter.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/super-linter.yml) 241 | 242 | [Super Linter](https://github.com/marketplace/actions/super-linter): Github Action to help validate your source code. 243 | 244 | [![Upload & Download Artifacts](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/upload-download-artifacts.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/upload-download-artifacts.yml) 245 | 246 | [Upload Artifact](https://github.com/marketplace/actions/upload-a-build-artifact): Github Action to share data between jobs and store data once a workflow is complete ([example](https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts#passing-data-between-jobs-in-a-workflow)). 247 | 248 | [Download Artifact](https://github.com/marketplace/actions/download-a-build-artifact): Github Action to download artifacts from your build ([example](https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts#passing-data-between-jobs-in-a-workflow)). 249 | 250 | [![Wait on check](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/wait-on-check.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/wait-on-check.yml) 251 | 252 | [Wait on check](https://github.com/marketplace/actions/wait-on-check): Github Action to pause a workflow until a job in another workflow completes successfully. 253 | 254 | [![Workflow Dispatch](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/workflow-dispatch.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/workflow-dispatch.yml) [![Workflow Dispatch Triggered](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/workflow-dispatch-triggerred.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/workflow-dispatch-triggerred.yml) 255 | 256 | [Workflow Dispatch](https://github.com/marketplace/actions/workflow-dispatch): Github Action to trigger another GitHub Actions workflow, using the `workflow_dispatch` event. The workflow must be configured for this event type `e.g. on: [workflow_dispatch]`. This allows you to chain workflows, the classic use case is have a CI build workflow, trigger a CD release/deploy workflow when it completes. Allowing you to maintain separate workflows for CI and CD, and pass data between them as required. 257 | 258 | *** 259 | 260 | ## 🐳 Docker Actions 261 | 262 | [![GHAction Container Scan](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/ghaction-container-scan.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/ghaction-container-scan.yml) 263 | 264 | [GHAction Container Scan](https://github.com/marketplace/actions/container-scan): GitHub Action to check for vulnerabilities in a container image with [Trivy](https://github.com/aquasecurity/trivy). 265 | 266 | [![Hadolint](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/hadolint.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/hadolint.yml) 267 | 268 | [Hadolint](https://github.com/burdzwastaken/hadolint-action): Github Action to run Hadolint and reports violations given a Dockerfile within a repository on a pull request. 269 | 270 | [![Phonito](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/phonito.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/phonito.yml) 271 | 272 | [Phonito](https://github.com/marketplace/actions/docker-vulnerability-scan-with-phonito-security): Github Action to automate scanning Docker images for OS & library vulnerabilities. Need a free Phonito Security account at [https://phonito.io](https://phonito.io). 273 | 274 | [![Publish Docker](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/publish-docker.yml/badge.svg)](https://github.com/GuillaumeFalourd/useful-actions/actions/workflows/publish-docker.yml) 275 | 276 | [Publish Docker](https://github.com/marketplace/actions/publish-docker): Github Action to build and push containers. 277 | 278 | ## 🦾 Other Tools Actions 279 | 280 | _TODO_ 281 | 282 | *** 283 | 284 | ## 🧐 How to create new actions 285 | 286 | The [Github tutorial](https://docs.github.com/en/actions/creating-actions) is great to understand how to create: 287 | 288 | - [Docker Container Actions](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action) 289 | - [Javascript Actions](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action) 290 | - [Composite Run Steps Actions](https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action) 291 | 292 | *** 293 | 294 | ## 🕵️ How to debug workflows 295 | 296 | The [action-upterm](https://github.com/lhotari/action-upterm) uses [upterm](https://upterm.dev/) and [tmux](https://github.com/tmux/tmux/wiki) to offer a direct way to interact with the host system on which the actual actions will run. 297 | 298 | By using this minimal example a upterm session will be created. 299 | 300 | ```yaml 301 | name: CI 302 | on: [push] 303 | jobs: 304 | build: 305 | runs-on: ubuntu-latest 306 | steps: 307 | - uses: actions/checkout@v2 308 | - name: Setup upterm session 309 | uses: lhotari/action-upterm@v1 310 | ``` 311 | 312 | To get the `ssh` connection string, just open the workflow `Checks` tab and scroll to the bottom. 313 | 314 | _Note: If you want to continue a workflow and you are inside a upterm session, just create a empty file with the name `continue` either in the root directory or in the workspace directory by running `touch continue` or `sudo touch /continue`. Closing the terminal will also continue the workflow. However you won't be able to reconnect in that case. It's possible to detach from the terminal and not continue by first pressing C-b and then d (tmux detach command keys)._ 315 | 316 | *** 317 | 318 | ## 🤖 How to test actions locally 319 | 320 | This tool can be used to test actions locally: [Act](https://github.com/nektos/act) 321 | 322 | Screenshot 323 | 324 | *** 325 | 326 | ## 🤝 Contribution 327 | 328 | Would like to contribute to the repository? Here are the [guidelines](CONTRIBUTING.md) 🚀 329 | 330 | 331 | 332 | 333 | 334 | 335 | (Made with [contributors-img](https://contrib.rocks)) 336 | --------------------------------------------------------------------------------