You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

comparison.en-us.md 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ---
  2. date: "2023-04-27T15:00:00+08:00"
  3. title: "Compared to GitHub Actions"
  4. slug: "comparison"
  5. sidebar_position: 30
  6. draft: false
  7. toc: false
  8. menu:
  9. sidebar:
  10. parent: "actions"
  11. name: "Comparison"
  12. sidebar_position: 30
  13. identifier: "actions-comparison"
  14. ---
  15. # Compared to GitHub Actions
  16. Even though Gitea Actions is designed to be compatible with GitHub Actions, there are some differences between them.
  17. ## Additional features
  18. ### Absolute action URLs
  19. Gitea Actions supports defining actions via absolute URL, which means that you can use actions from any git repository.
  20. Like `uses: https://github.com/actions/checkout@v4` or `uses: http://your_gitea.com/owner/repo@branch`.
  21. ### Actions written in Go
  22. Gitea Actions supports writing actions in Go.
  23. See [Creating Go Actions](https://blog.gitea.com/creating-go-actions/).
  24. ### Support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly on schedule
  25. Github Actions doesn't support that. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
  26. ## Unsupported workflows syntax
  27. ### `concurrency`
  28. It's used to run a single job at a time.
  29. See [Using concurrency](https://docs.github.com/en/actions/using-jobs/using-concurrency).
  30. It's ignored by Gitea Actions now.
  31. ### `run-name`
  32. The name for workflow runs generated from the workflow.
  33. See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#run-name).
  34. It's ignored by Gitea Actions now.
  35. ### `permissions` and `jobs.<job_id>.permissions`
  36. See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions).
  37. It's ignored by Gitea Actions now.
  38. ### `jobs.<job_id>.timeout-minutes`
  39. See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes).
  40. It's ignored by Gitea Actions now.
  41. ### `jobs.<job_id>.continue-on-error`
  42. See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error).
  43. It's ignored by Gitea Actions now.
  44. ### `jobs.<job_id>.environment`
  45. See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idenvironment).
  46. It's ignored by Gitea Actions now.
  47. ### Complex `runs-on`
  48. See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on).
  49. Gitea Actions only supports `runs-on: xyz` or `runs-on: [xyz]` now.
  50. ### `workflow_dispatch`
  51. See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatch).
  52. It's ignored by Gitea Actions now.
  53. ### `hashFiles` expression
  54. See [Expressions](https://docs.github.com/en/actions/learn-github-actions/expressions#hashfiles)
  55. Gitea Actions doesn't support it now, if you use it, the result will always be empty string.
  56. As a workaround, you can use [go-hashfiles](https://gitea.com/actions/go-hashfiles) instead.
  57. ## Missing features
  58. ### Problem Matchers
  59. Problem Matchers are a way to scan the output of actions for a specified regex pattern and surface that information prominently in the UI.
  60. See [Problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md).
  61. It's ignored by Gitea Actions now.
  62. ### Create an error annotation
  63. See [Creating an annotation for an error](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-creating-an-annotation-for-an-error)
  64. It's ignored by Gitea Actions now.
  65. ## Missing UI features
  66. ### Pre and Post steps
  67. Pre and Post steps don't have their own section in the job log user interface.
  68. ### Services steps
  69. Services steps don't have their own section in the job log user interface.
  70. ## Different behavior
  71. ### Downloading actions
  72. Previously (Pre 1.21.0), `[actions].DEFAULT_ACTIONS_URL` defaulted to `https://gitea.com`.
  73. We have since restricted this option to only allow two values (`github` and `self`).
  74. When set to `github`, the new default, Gitea will download non-fully-qualified actions from `https://github.com`.
  75. For example, if you use `uses: actions/checkout@v4`, it will download the checkout repository from `https://github.com/actions/checkout.git`.
  76. If you want to download an action from another git hoster, you can use an absolute URL, e.g. `uses: https://gitea.com/actions/checkout@v4`.
  77. If your Gitea instance is in an intranet or a restricted area, you can set the URL to `self` to only download actions from your own instance by default.
  78. Of course, you can still use absolute URLs in workflows.
  79. More details about the `[actions].DEFAULT_ACTIONS_URL` configuration can be found in the [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions)。
  80. ### Context availability
  81. Context availability is not checked, so you can use the env context on more places.
  82. See [Context availability](https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability).