1
0
mirror of synced 2025-12-23 03:44:00 -05:00

[DO NOT MERGE - WIP Language test]: New translation batch for ru (#32680)

Co-authored-by: Grace Park <gracepark@github.com>
This commit is contained in:
docubot
2022-11-16 13:42:42 -08:00
committed by GitHub
parent bc92535b7f
commit 1ecefb5704
4624 changed files with 204577 additions and 6 deletions

View File

@@ -47,9 +47,9 @@ jobs:
# We'll be ready to add the following languages in a future effort.
# - language: ru
# language_dir: translations/ru-RU
# language_repo: github/docs-internal.ru-ru
- language: ru
language_dir: translations/ru-RU
language_repo: github/docs-internal.ru-ru
# - language: ko
# language_dir: translations/ko-KR

View File

@@ -36,7 +36,7 @@ jobs:
fail-fast: false
matrix:
# This needs to match the languages we support
language: [en, ja, es, pt, cn]
language: [en, ja, es, pt, cn, ru]
steps:
- if: ${{ env.FREEZE == 'true' }}
run: |

View File

@@ -11,6 +11,7 @@ const possibleEnvVars = {
'zh-CN': process.env.TRANSLATIONS_ROOT_ZH_CN,
'ja-JP': process.env.TRANSLATIONS_ROOT_JA_JP,
'pt-BR': process.env.TRANSLATIONS_ROOT_PT_BR,
'ru-RU': process.env.TRANSLATIONS_ROOT_RU_RU,
}
function getRoot(languageCode) {
@@ -69,6 +70,14 @@ const languages = {
dir: getRoot('pt-BR'),
wip: false,
},
ru: {
name: 'Russian',
nativeName: 'русский',
code: 'ru',
hreflang: 'ru',
dir: getRoot('ru-RU'),
wip: true,
},
}
if (process.env.ENABLED_LANGUAGES) {

View File

@@ -181,7 +181,7 @@
"scripts": {
"browser-test": "cross-env BROWSER=1 NODE_OPTIONS=--experimental-vm-modules JEST_PUPPETEER_CONFIG=jest-puppeteer.config.cjs jest tests/browser/browser.js",
"build": "next build",
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES='en,ja' nodemon --inspect server.js",
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES='en,ja,ru' nodemon --inspect server.js",
"dev": "cross-env npm start",
"index-test-fixtures": "node script/search/index-elasticsearch.js -l en -V ghae -V dotcom --index-prefix tests -- tests/content/fixtures/search-indexes",
"lint": "eslint '**/*.{js,mjs,ts,tsx}'",
@@ -192,7 +192,7 @@
"prevent-pushes-to-main": "node script/prevent-pushes-to-main.js",
"rest-dev": "script/rest/update-files.js && npm run dev",
"show-action-deps": "echo 'Action Dependencies:' && rg '^[\\s|-]*(uses:.*)$' .github -I -N --no-heading -r '$1$2' | sort | uniq | cut -c 7-",
"start": "cross-env NODE_ENV=development ENABLED_LANGUAGES='en,ja' nodemon server.js",
"start": "cross-env NODE_ENV=development ENABLED_LANGUAGES='en,ja,ru' nodemon server.js",
"start-all-languages": "cross-env NODE_ENV=development nodemon server.js",
"sync-search": "cross-env NODE_OPTIONS='--max_old_space_size=8192' start-server-and-test sync-search-server 4002 sync-search-indices",
"sync-search-ghes-release": "cross-env GHES_RELEASE=1 start-server-and-test sync-search-server 4002 sync-search-indices",

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
Placeholder

View File

@@ -0,0 +1,50 @@
---
title: Учетная запись и профиль на GitHub
shortTitle: Account and profile
intro: 'Обеспечьте для себя максимальное удобство использования {% data variables.product.product_name %}, изменив параметры личной учетной записи, персонализировав страницу профиля и настроив уведомления о действиях на {% data variables.product.prodname_dotcom %}.'
introLinks:
quickstart: /get-started/onboarding/getting-started-with-your-github-account
featuredLinks:
guides:
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username
- '{% ifversion ghae %}/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard{% endif %}'
- /account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme
- '{% ifversion ghae %}/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile{% endif %}'
- /account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications
popular:
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository
- /account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications
guideCards:
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile
- /account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/managing-notifications-from-your-inbox
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address
- '{% ifversion ghes or ghae %}/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories{% endif %}'
changelog:
label: 'profiles, github-themes, notifications'
versions:
fpt: '*'
ghec: '*'
layout: product-landing
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Profiles
- Notifications
children:
- /setting-up-and-managing-your-personal-account-on-github
- /setting-up-and-managing-your-github-profile
- /managing-subscriptions-and-notifications-on-github
ms.openlocfilehash: 922990e3a89a53f625e739650c3c3b329f1f497d
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: '146200197'
---

View File

@@ -0,0 +1,28 @@
---
title: Управление подписками и уведомлениями на GitHub
intro: 'Вы можете указать, как получать уведомления, репозитории, которые вас интересуют, и типы действий, о которых вы хотите узнать.'
redirect_from:
- /categories/76/articles
- /categories/notifications
- /categories/receiving-notifications-about-activity-on-github
- /github/managing-subscriptions-and-notifications-on-github
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
children:
- /setting-up-notifications
- /viewing-and-triaging-notifications
- /managing-subscriptions-for-activity-on-github
shortTitle: Subscriptions & notifications
ms.openlocfilehash: 33c5c21db5feb48ca234e2ba45173f480fb53f8f
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145113035'
---

View File

@@ -0,0 +1,24 @@
---
title: Управление подписками для действий в GitHub
intro: 'Чтобы обеспечить стабильность рабочих процессов уведомлений, изучите и регулярно просматривайте подписки.'
redirect_from:
- /github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
children:
- /viewing-your-subscriptions
- /managing-your-subscriptions
shortTitle: Manage subscriptions
ms.openlocfilehash: e1457283f0027dd2b668d6096e2f04273e920a71
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145088484'
---

View File

@@ -0,0 +1,84 @@
---
title: Managing your subscriptions
intro: 'To help you manage your notifications efficiently, there are several ways to unsubscribe.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
redirect_from:
- /github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions
- /github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions
shortTitle: Manage your subscriptions
---
To help you understand your subscriptions and decide whether to unsubscribe, see "[Viewing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions)."
{% note %}
**Note:** Instead of unsubscribing, you have the option to ignore a repository. If you ignore a repository, you won't receive any notifications. We don't recommend ignoring repositories as you won't be notified if you're @mentioned. {% ifversion fpt or ghec %}If you're experiencing abuse and want to ignore a repository, please contact {% data variables.contact.contact_support %} so we can help. {% data reusables.policies.abuse %}{% endif %}
{% endnote %}
## Choosing how to unsubscribe
To unwatch (or unsubscribe from) repositories quickly, navigate to [github.com/watching](https://github.com/watching) to see all the repositories you're following. For more information, see "[Unwatching repositories](#unwatching-repositories)."
To unsubscribe from multiple notifications at the same time, you can unsubscribe using your inbox or on the subscriptions page. Both of these options offer more context about your subscriptions than the "Watched repositories" page.
### Benefits of unsubscribing from your inbox
When you unsubscribe from notifications in your inbox, you have several other triaging options and can filter your notifications by custom filters and discussion types. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)."
### Benefits of unsubscribing from the subscriptions page
When you unsubscribe from notifications on the subscriptions page, you can see more of the notifications you're subscribed to and sort them by "Most recently subscribed" or "Least recently subscribed".
The subscriptions page shows you all of the notifications that you're currently subscribed to, including notifications that you have marked as **Done** in your inbox.
You can only filter your subscriptions by repository and the reason you're receiving the notification.
## Unsubscribing from notifications in your inbox
When you unsubscribe from notifications in your inbox, they will automatically disappear from your inbox.
{% data reusables.notifications.access_notifications %}
1. From the notifications inbox, select the notifications you want to unsubscribe to.
2. Click **Unsubscribe.**
![Unsubscribe option from main inbox](/assets/images/help/notifications-v2/unsubscribe-from-main-inbox.png)
## Unsubscribing from notifications on the subscriptions page
{% data reusables.notifications.access_notifications %}
1. In the left sidebar, under the list of repositories, use the "Manage notifications" drop-down to click **Subscriptions**.
![Manage notifications drop down menu options](/assets/images/help/notifications-v2/manage-notifications-options.png)
2. Select the notifications you want to unsubscribe to. In the top right, click **Unsubscribe.**
![Subscriptions page](/assets/images/help/notifications-v2/unsubscribe-from-subscriptions-page.png)
## Unwatching repositories
When you unwatch a repository, you unsubscribe from future updates from that repository unless you participate in a conversation or are @mentioned.
{% data reusables.notifications.access_notifications %}
1. In the left sidebar, under the list of repositories, use the "Manage notifications" drop-down to click **Watched repositories**.
![Manage notifications drop down menu options](/assets/images/help/notifications-v2/manage-notifications-options.png)
2. On the watched repositories page, after you've evaluated the repositories you're watching, choose whether to:
- Unwatch a repository
- Ignore all notifications for a repository
- If enabled, customize the types of event you receive notifications for ({% data reusables.notifications-v2.custom-notification-types %})
{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
1. Optionally, to unsubscribe from all repositories owned by a given user or organization, select the **Unwatch all** dropdown and click the organization whose repositories you'd like to unsubscribe from. The button to unwatch all repositories is only available if you are watching all activity or custom notifications on over 10 repositories.
![Screenshot of the Unwatch All button.](/assets/images/help/notifications-v2/unsubscribe-from-all-repos.png)
- Click **Unwatch** to confirm that you want to unwatch the repositories owned by the selected user or organization, or click **Cancel** to cancel.
![Screenshot of the unwatch all confirmation dialogue.](/assets/images/help/notifications-v2/unwatch-repo-dialog.png)
{% endif %}

View File

@@ -0,0 +1,86 @@
---
title: Просмотр подписок
intro: 'Чтобы понять, откуда поступают ваши уведомления и проанализировать объем уведомлений, рекомендуется регулярно просматривать подписки и наблюдаемые репозитории.'
redirect_from:
- /articles/subscribing-to-conversations
- /articles/unsubscribing-from-conversations
- /articles/subscribing-to-and-unsubscribing-from-notifications
- /articles/listing-the-issues-and-pull-requests-youre-subscribed-to
- /articles/watching-repositories
- /articles/unwatching-repositories
- /articles/watching-and-unwatching-repositories
- /articles/watching-and-unwatching-releases-for-a-repository
- /articles/watching-and-unwatching-team-discussions
- /articles/listing-watched-repositories
- /articles/listing-the-repositories-you-re-watching
- /articles/listing-the-repositories-youre-watching
- /github/managing-subscriptions-and-notifications-on-github/viewing-your-subscriptions
- /github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
shortTitle: View subscriptions
ms.openlocfilehash: 2e3fca1f56e26e9f17a56911b93480a538c715ec
ms.sourcegitcommit: 37e362868bd023d87b257fb2436ae76a81dc8f8b
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/04/2022
ms.locfileid: '148008775'
---
Вы получаете уведомления о своих подписках о текущей активности в {% data variables.product.product_name %}. Есть много причин подписки на беседу. Дополнительные сведения см. в разделе [Сведения об уведомлениях](/github/managing-subscriptions-and-notifications-on-github/about-notifications#notifications-and-subscriptions).
Мы рекомендуем выполнить аудит и отменить подписку в рамках работоспособного рабочего процесса уведомлений. Дополнительные сведения о вариантах отмены подписки см. в разделе [Управление подписками](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions).
## Определение причин для получения слишком большого числа уведомлений
Если в папке «Входящие» слишком много уведомлений, которыми требуется управлять, возможно, вы оформили слишком много подписок. Также можно попробовать изменить параметры уведомлений, чтобы уменьшить количество подписок и типов уведомлений, которые вы получаете. Например, вы можете отключить параметры для автоматического отслеживания всех репозиториев и всех обсуждений команды при каждом присоединении к команде или репозиторию.
{% ifversion update-notification-settings-22 %} ![ Снимок экрана: параметры автоматического просмотра для команд и репозиториев](/assets/images/automatically-watch-repos-and-teams.png) {% else %} ![Снимок экрана: параметры автоматического просмотра для команд и репозиториев](/assets/images/help/notifications-v2/automatic-watching-example.png){% endif %}
Дополнительные сведения см. в разделе [Настройка уведомлений](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#automatic-watching).
Общие сведения о подписках репозитория см. в разделе [Просмотр репозиториев, которые вы отслеживаете](#reviewing-repositories-that-youre-watching). {% tip %}
**Совет.** Вы можете выбрать типы событий, о которых вы хотите получать уведомления, с помощью параметра **Настраиваемые** в раскрывающемся списке **Отслеживать/отменить отслеживание** на [странице отслеживания](https://github.com/watching) или на любой странице репозитория в {% data variables.product.product_name %}. Дополнительные сведения см. в разделе [Настройка уведомлений](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository).
{% endtip %}
Многие люди забывают о репозиториях, которые они когда-то решили отслеживать. На странице «Отслеживаемые репозитории» можно быстро отменить отслеживание репозиториев. Дополнительные сведения о способах отмены подписки см. в разделе [Рекомендации по отмене отслеживания](https://github.blog/changelog/2020-11-10-unwatch-recommendations/) в {% data variables.product.prodname_blog %} и разделе [Управление подписками](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions). Вы также можете создать рабочий процесс рассмотрения, чтобы помочь в управлении уведомлениями. Рекомендации по работе с рабочими процессами см. в разделе [Настройка рабочего процесса для рассмотрения уведомлений](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications).
## Просмотр всех подписок
{% data reusables.notifications.access_notifications %}
1. На левой боковой панели в списке репозиториев, от которых вы получаете уведомления, используйте раскрывающийся список «Управление уведомлениями», чтобы щелкнуть **Параметры уведомлений**.
![Параметры раскрывающегося меню «Управление уведомлениями»](/assets/images/help/notifications-v2/manage-notifications-options.png)
2. Используйте фильтры и сортировку, чтобы сузить список подписок и начать отмену подписок на беседы, для которых больше не требуется получать уведомления.
![Страница «Подписки»](/assets/images/help/notifications-v2/all-subscriptions.png)
{% tip %}
**Советы**
- Чтобы просмотреть подписки, о которых вы, возможно, забыли, выполните сортировку по критерию «последние оформленные подписки».
- Чтобы просмотреть список репозиториев, для которых вы по-прежнему можете получать уведомления, см. список репозиториев в раскрывающемся меню «Фильтр по репозиторию».
{% endtip %}
## Просмотр репозиториев, которые вы отслеживаете
1. На левой боковой панели в списке репозиториев используйте раскрывающийся список «Управление уведомлениями» и щелкните **Отслеживаемые репозитории**.
![Параметры раскрывающегося меню «Управление уведомлениями»](/assets/images/help/notifications-v2/manage-notifications-options.png)
2. Оцените репозитории, которые вы отслеживаете, и решите, являются ли их обновления по-прежнему актуальными и полезными. При отслеживании репозитория вы будете получать уведомления обо всех беседах для этого репозитория.
![Страница «Отслеживаемые уведомления»](/assets/images/help/notifications-v2/watched-notifications-custom.png)
{% tip %}
**Совет.** Вместо отслеживания репозитория рекомендуется получать уведомления только при наличии обновлений для {% data reusables.notifications-v2.custom-notification-types %} (если он включен для репозитория) или любого сочетания этих параметров. Можно также полностью отменить отслеживание репозитория.
При отмене отслеживания репозитория вы по-прежнему будете получать уведомления, когда вы @mentioned или участвуете в потоке. При настройке получения уведомлений для определенных типов событий вы будете получать уведомления только при наличии обновлений для этих типов событий в репозитории, если вы участвуете в потоке либо если вы или команда, где вы участвуете, является @mentioned.
{% endtip %}

View File

@@ -0,0 +1,99 @@
---
title: About notifications
intro: 'Notifications provide updates about the activity on {% data variables.location.product_location %} that you''ve subscribed to. You can use the notifications inbox to customize, triage, and manage your updates.'
redirect_from:
- /articles/notifications
- /articles/about-notifications
- /github/managing-subscriptions-and-notifications-on-github/about-notifications-beta
- /github/managing-subscriptions-and-notifications-on-github/about-notifications
- /github/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
---
## Notifications and subscriptions
You can choose to receive ongoing updates about specific activity on {% data variables.location.product_location %} through a subscription. Notifications are updates that you receive for specific activity that you are subscribed to.
### Subscription options
You can choose to subscribe to notifications for:
- A conversation in a specific issue, pull request, or gist.
- All activity in a repository or team discussion.
- CI activity, such as the status of workflows in repositories set up with {% data variables.product.prodname_actions %}.
- Repository {% data reusables.notifications-v2.custom-notification-types %} (if enabled).
You can also choose to automatically watch all repositories that you have push access to, except forks. You can watch any other repository you have access to manually by clicking **Watch**.
If you're no longer interested in a conversation, you can unsubscribe, unwatch, or customize the types of notifications you'll receive in the future. For example, if you no longer want to receive notifications from a particular repository, you can click **Unsubscribe**. For more information, see "[Managing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)."
### Default subscriptions
In general, you are automatically subscribed to conversations by default when you have:
- Not disabled automatic watching for repositories or teams you've joined in your notification settings. This setting is enabled by default.
- Been assigned to an issue or pull request.
- Opened a pull request, issue, or created a team discussion post.
- Commented on a thread.
- Subscribed to a thread manually by clicking **Watch** or **Subscribe**.
- Had your username @mentioned.
- Changed the state of a thread, such as by closing an issue or merging a pull request.
- Had a team you're a member of @mentioned.
By default, you also automatically watch all repositories that you create and are owned by your personal account.
To unsubscribe from conversations you're automatically subscribed to, you can change your notification settings or directly unsubscribe or unwatch activity on {% data variables.location.product_location %}. For more information, see "[Managing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)."
## Customizing notifications and subscriptions
You can choose to view your notifications through the notifications inbox at [https://github.com/notifications](https://github.com/notifications){% ifversion fpt or ghes or ghec %} and in the {% data variables.product.prodname_mobile %} app{% endif %}, through your email, or some combination of these options.
To customize the types of updates you'd like to receive and where to send those updates, configure your notification settings. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications)."
To keep your subscriptions manageable, review your subscriptions and watched repositories and unsubscribe as needed. For more information, see "[Managing subscriptions for activity on GitHub](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github)."
To customize how you'd like to receive updates for specific pull requests or issues, you can configure your preferences within the issue or pull request. For more information, see "[Triaging a single notification](/github/managing-subscriptions-and-notifications-on-github/triaging-a-single-notification#customizing-when-to-receive-future-updates-for-an-issue-or-pull-request)."
{% ifversion fpt or ghes or ghec %}
You can customize and schedule push notifications in the {% data variables.product.prodname_mobile %} app. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#managing-your-notification-settings-with-github-mobile)."
{% endif %}
## Reasons for receiving notifications
Your inbox is configured with default filters, which represent the most common reasons that people need to follow-up on their notifications. For more information about inbox filters, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#default-notification-filters)."
Your inbox shows the `reasons` you're receiving notifications as a label.
![Reasons labels in inbox](/assets/images/help/notifications-v2/reasons-as-labels-in-inbox.png)
You can filter your inbox by the reason you're subscribed to notifications. For example, to only see pull requests where someone requested your review, you can use the `review-requested` query filter.
![Filter notifications by review requested reason](/assets/images/help/notifications-v2/review-requested-reason.png)
If you've configured notifications to be sent by email and believe you're receiving notifications that don't belong to you, consider troubleshooting with email headers, which show the intended recipient. For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#filtering-email-notifications)."
## Triaging notifications from your inbox
To effectively manage your notifications, you can triage your inbox with options to:
- Remove a notification from the inbox with **Done**. You can review **Done** notifications all in one place by clicking **Done** in the sidebar or by using the query `is:done`.
- Mark a notification as read or unread.
- **Save** a notification for later review. **Saved** notifications are flagged in your inbox. You can review **Saved** notifications all in one place in the sidebar by clicking **Saved** or by using the query `is:saved`.
- Automatically unsubscribe from this notification and future updates from this conversation. Unsubscribing also removes the notification from your inbox. If you unsubscribe from a conversation and someone mentions your username or a team you're on that you're receiving updates for, then you will start to receive notifications from this conversation again.
From your inbox you can also triage multiple notifications at once. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#triaging-multiple-notifications-at-the-same-time)."
## Customizing your notifications inbox
To focus on a group of notifications in your inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} or {% data variables.product.prodname_mobile %}{% endif %}, you can create custom filters. For example, you can create a custom filter for an open source project you contribute to and only see notifications for that repository in which you are mentioned. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)." For more examples of how to customize your triaging workflow, see "[Customizing a workflow for triaging your notifications](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)."
## Notification retention policy
Notifications that are not marked as **Saved** are kept for 5 months. Notifications marked as **Saved** are kept indefinitely. If your saved notification is older than 5 months and you unsave it, the notification will disappear from your inbox within a day.
## Feedback and support
If you have feedback or feature requests for notifications, use a [{% data variables.product.prodname_github_community %} discussion](https://github.com/orgs/community/discussions/categories/general).

View File

@@ -0,0 +1,304 @@
---
title: Configuring notifications
intro: 'Choose the type of activity on {% data variables.product.prodname_dotcom %} that you want to receive notifications for and how you want these updates delivered.'
redirect_from:
- /articles/about-web-notifications
- /format-of-notification-emails
- /articles/configuring-notification-emails
- /articles/about-notification-emails
- /articles/about-email-notifications
- /articles/accessing-your-notifications
- /articles/configuring-notification-delivery-methods
- /articles/managing-notification-delivery-methods
- /articles/managing-notification-emails-for-organizations
- /articles/choosing-the-delivery-method-for-your-notifications
- /articles/choosing-the-types-of-notifications-you-receive
- /github/managing-subscriptions-and-notifications-on-github/configuring-notifications
- /github/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
---
## Notification delivery options
You can receive notifications for activity on {% data variables.location.product_location %} in the following locations.
- The notifications inbox in the {% data variables.location.product_location %} web interface{% ifversion fpt or ghes or ghec %}
- The notifications inbox on {% data variables.product.prodname_mobile %}, which syncs with the inbox on {% data variables.location.product_location %}{% endif %}
- An email client that uses a verified email address, which can also sync with the notifications inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %}
{% ifversion fpt or ghes or ghec %}
{% data reusables.notifications-v2.notifications-inbox-required-setting %} For more information, see "[Choosing your notification settings](#choosing-your-notification-settings)."
{% endif %}
{% data reusables.notifications.shared_state %}
### Benefits of the notifications inbox
The notifications inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %} includes triaging options designed specifically for your {% data variables.product.prodname_dotcom %} notifications flow, including options to:
- Triage multiple notifications at once.
- Mark completed notifications as **Done** and remove them from your inbox. To view all of your notifications marked as **Done**, use the `is:done` query.
- Save a notification to review later. Saved notifications are flagged in your inbox and kept indefinitely. To view all of your saved notifications, use the `is:saved` query.
- Unsubscribe and remove a notification from your inbox.
- Preview the issue, pull request, or team discussion where the notification originates on {% data variables.location.product_location %} from within the notifications inbox.
- See one of the latest reasons you're receiving a notification from your inbox with a `reasons` label.
- Create custom filters to focus on different notifications when you want.
- Group notifications in your inbox by repository or date to get a quick overview with less context switching
{% ifversion fpt or ghes or ghec %}
In addition, you can receive and triage notifications on your mobile device with {% data variables.product.prodname_mobile %}. For more information, see "[Managing your notification settings with GitHub Mobile](#managing-your-notification-settings-with-github-mobile)" or "[GitHub Mobile](/get-started/using-github/github-mobile)."
{% endif %}
### Benefits of using an email client for notifications
One benefit of using an email client is that all of your notifications can be kept indefinitely depending on your email client's storage capacity. Your inbox notifications are only kept for 5 months on {% data variables.product.prodname_dotcom %} unless you've marked them as **Saved**. **Saved** notifications are kept indefinitely. For more information about your inbox's retention policy, see "[About notifications](/github/managing-subscriptions-and-notifications-on-github/about-notifications#notification-retention-policy)."
Sending notifications to your email client also allows you to customize your inbox according to your email client's settings, which can include custom or color-coded labels.
Email notifications also allow flexibility with the types of notifications you receive and allow you to choose different email addresses for updates. For example, you can send certain notifications for a repository to a verified personal email address. For more information, about your email customization options, see "[Customizing your email notifications](#customizing-your-email-notifications)."
## About participating and watching notifications
When you watch a repository, you're subscribing to updates for activity in that repository. Similarly, when you watch a specific team's discussions, you're subscribing to all conversation updates on that team's page. For more information, see "[About team discussions](/organizations/collaborating-with-your-team/about-team-discussions)."
To see repositories that you're watching, go to your [watching page](https://github.com/watching). For more information, see "[Managing subscriptions and notifications on GitHub](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github)."
{% ifversion ghae %}
### Configuring notifications
{% endif %}
You can configure notifications for a repository on the repository page, or on your watching page.
### About custom notifications
You can customize notifications for a repository. For example, you can choose to only be notified when updates to one or more types of events ({% data reusables.notifications-v2.custom-notification-types %}) happen within a repository, or ignore all notifications for a repository. For more information, see "[Configuring your watch settings for an individual repository](#configuring-your-watch-settings-for-an-individual-repository)" below.
### Participating in conversations
Anytime you comment in a conversation or when someone @mentions your username, you are _participating_ in a conversation. By default, you are automatically subscribed to a conversation when you participate in it. You can unsubscribe from a conversation you've participated in manually by clicking **Unsubscribe** on the issue or pull request or through the **Unsubscribe** option in the notifications inbox.
{% ifversion update-notification-settings-22 %}For conversations you're watching or participating in, you can choose whether you want to receive notifications on {% data variables.product.company_short %} or by email in your notification settings. For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)."
![Animated GIF of participating and watching subscriptions options](/assets/images/help/notifications/selecting-participating-notifications.gif)
{% else %}
For conversations you're watching or participating in, you can choose whether you want to receive notifications by email or through the notifications inbox on {% data variables.location.product_location %}{% ifversion ghes %} and {% data variables.product.prodname_mobile %}{% endif %}. For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)."
![Screenshot of participating and watching notifications options](/assets/images/help/notifications-v2/participating-and-watching-options.png){% endif %}
For example:
- If you don't want notifications to be sent to your email, unselect **email** for participating and watching notifications.
- If you want to receive notifications by email when you've participated in a conversation, then you can select **email** under "Participating".
{% ifversion update-notification-settings-22 %}If you do not enable "Notify me: On GitHub" for watching or participating notifications, then your notifications inbox will not have any updates.
{% else %}
If you do not enable watching or participating notifications for web{% ifversion ghes %} and mobile{% endif %}, then your notifications inbox will not have any updates.{% endif %}
## Customizing your email notifications
After enabling email notifications, {% data variables.location.product_location %} will send notifications to you as multipart emails that contain both HTML and plain text copies of the content. Email notification content includes any Markdown, @mentions, emojis, hash-links, and more, that appear in the original content on {% data variables.location.product_location %}. If you only want to see the text in the email, you can configure your email client to display the plain text copy only.
{% data reusables.notifications.outbound_email_tip %}
{% data reusables.notifications.shared_state %}
{% ifversion fpt or ghec %}
If you're using Gmail, you can click a button beside the notification email to visit the original issue or pull request that generated the notification.
![Buttons in Gmail](/assets/images/help/notifications/gmail-buttons.png)
{% endif %}
Choose a default email address where you want to send updates for conversations you're participating in or watching. You can also specify which activity on {% data variables.location.product_location %} you want to receive updates for using your default email address. For example, choose whether you want updates to your default email from:
- Comments on issues and pull requests.
- Pull request reviews.
- Pull request pushes.
- Your own updates, such as when you open, comment on, or close an issue or pull request.
Depending on the organization that owns the repository, you can also send notifications to different email addresses. Your organization may require the email address to be verified for a specific domain. For more information, see "[Choosing where your organizations email notifications are sent](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#choosing-where-your-organizations-email-notifications-are-sent)."
You can also send notifications for a specific repository to an email address. For more information, see "[About email notifications for pushes to your repository](/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository)."
{% data reusables.notifications-v2.email-notification-caveats %}
## Filtering email notifications
Each email notification that {% data variables.location.product_location %} sends contains header information. The header information in every email is consistent, so you can use it in your email client to filter or forward all {% data variables.product.prodname_dotcom %} notifications, or certain types of {% data variables.product.prodname_dotcom %} notifications.
If you believe you're receiving notifications that don't belong to you, examine the `X-GitHub-Recipient` and `X-GitHub-Recipient-Address` headers. These headers show who the intended recipient is. Depending on your email setup, you may receive notifications intended for another user.
Email notifications from {% data variables.location.product_location %} contain the following header information:
| Header | Information |
| --- | --- |
| `From` address | This address will always be {% ifversion fpt or ghec %}'`notifications@github.com`'{% else %}'the no-reply email address configured by your site administrator'{% endif %}. |
| `To` field | This field connects directly to the thread.{% ifversion not ghae %} If you reply to the email, you'll add a new comment to the conversation.{% endif %} |
| `Cc` address | {% data variables.product.product_name %} will `Cc` you if you're subscribed to a conversation. The second `Cc` email address matches the notification reason. The suffix for these notification reasons is {% data variables.notifications.cc_address %}. The possible notification reasons are: <ul><li>`assign`: You were assigned to an issue or pull request.</li><li>`author`: You created an issue or pull request.</li><li>`ci_activity`: A {% data variables.product.prodname_actions %} workflow run that you triggered was completed.</li><li>`comment`: You commented on an issue or pull request.</li><li>`manual`: There was an update to an issue or pull request you manually subscribed to.</li><li>`mention`: You were mentioned on an issue or pull request.</li><li>`push`: Someone committed to a pull request you're subscribed to.</li><li>`review_requested`: You or a team you're a member of was requested to review a pull request.</li><li>`security_alert`: {% data variables.product.prodname_dotcom %} detected a vulnerability in a repository you receive alerts for.</li><li>`state_change`: An issue or pull request you're subscribed to was either closed or opened.</li><li>`subscribed`: There was an update in a repository you're watching.</li><li>`team_mention`: A team you belong to was mentioned on an issue or pull request.</li><li>`your_activity`: You opened, commented on, or closed an issue or pull request.</li></ul> |
| `mailing list` field | This field identifies the name of the repository and its owner. The format of this address is always `<repository name>.<repository owner>.{% data variables.command_line.backticks %}`. |
| `X-GitHub-Severity` field | {% data reusables.repositories.security-alerts-x-github-severity %} The possible severity levels are:<ul><li>`low`</li><li>`moderate`</li><li>`high`</li><li>`critical`</li></ul>For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)." |
## Choosing your notification settings
{% data reusables.notifications.access_notifications %}
{% data reusables.notifications-v2.manage-notifications %}
3. On the notifications settings page, choose how you receive notifications when:
- There are updates in repositories or team discussions you're watching or in a conversation you're participating in. For more information, see "[About participating and watching notifications](#about-participating-and-watching-notifications)."
- You gain access to a new repository or you've joined a new team. For more information, see "[Automatic watching](#automatic-watching)."
- There are new {% data variables.product.prodname_dependabot_alerts %} in your repository. For more information, see "[{% data variables.product.prodname_dependabot_alerts %} notification options](#dependabot-alerts-notification-options)." {% ifversion fpt or ghec %}
- There are workflow runs updates on repositories set up with {% data variables.product.prodname_actions %}. For more information, see "[{% data variables.product.prodname_actions %} notification options](#github-actions-notification-options)."{% endif %}{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
- There are new deploy keys added to repositories that belong to organizations that you're an owner of. For more information, see "[Organization alerts notification options](#organization-alerts-notification-options)."{% endif %}
## Automatic watching
By default, anytime you gain access to a new repository, you will automatically begin watching that repository. Anytime you join a new team, you will automatically be subscribed to updates and receive notifications when that team is @mentioned. If you don't want to automatically be subscribed, you can unselect the automatic watching options in your notification settings.
{% ifversion update-notification-settings-22 %}
![Automatic watching options for teams and repositories](/assets/images/automatically-watch-repos-and-teams.png)
{% else %}
![Automatic watching options](/assets/images/help/notifications-v2/automatic-watching-options.png){% endif %}
If "Automatically watch repositories" is disabled, then you will not automatically watch your own repositories. You must navigate to your repository page and choose the watch option.
For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)."
## Configuring your watch settings for an individual repository
You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of certain event types such as {% data reusables.notifications-v2.custom-notification-types %} (if enabled for the repository) , or completely ignore an individual repository.
{% data reusables.repositories.navigate-to-repo %}
2. In the upper-right corner, select the "Watch" drop-down menu to click a watch option.
![Watch options in a drop-down menu for a repository](/assets/images/help/notifications-v2/watch-repository-options-custom.png)
The **Custom** option allows you to further customize notifications so that you're only notified when specific events happen in the repository, in addition to participating and @mentions.
![Custom watch options in a drop-down menu for a repository](/assets/images/help/notifications-v2/watch-repository-options-custom2-dotcom.png)
If you select "Issues", you will be notified about, and subscribed to, updates on every issue (including those that existed prior to you selecting this option) in the repository. If you're @mentioned in a pull request in this repository, you'll receive notifications for that too, and you'll be subscribed to updates on that specific pull request, in addition to being notified about issues.
## Choosing where your organizations email notifications are sent
If you belong to an organization, you can choose the email account you want notifications for organization activity sent to. For example, if you belong to an organization for work, you may want your notifications sent to your work email address, rather than your personal address.
{% data reusables.notifications-v2.email-notification-caveats %}
{% data reusables.notifications.access_notifications %}
{% data reusables.notifications-v2.manage-notifications %}
3. Under "Default notification email", select the email address you'd like notifications sent to.
{% ifversion update-notification-settings-22 %}
![Screenshot of the default notification email address setting](/assets/images/help/notifications/default-email-address-emphasized.png)
{% else %}
![Screenshot of the default notification email address dropdown](/assets/images/help/notifications/notifications_primary_email_for_orgs.png){% endif %}
{% ifversion ghes or ghae %}
4. Click **Save**.{% endif %}
### Customizing email routes per organization
If you are a member of more than one organization, you can configure each one to send notifications to any of{% ifversion fpt or ghec %} your verified email addresses{% else %} the email addresses for your account{% endif %}. {% ifversion fpt or ghec %} For more information, see "[Verifying your email address](/articles/verifying-your-email-address)."{% endif %}
{% data reusables.notifications.access_notifications %}
{% data reusables.notifications-v2.manage-notifications %}
{% ifversion update-notification-settings-22 %}
3. Under "Default notifications email", click **Custom routing**.
![Screenshot of default notifications email settings with custom routing button emphasised](/assets/images/help/notifications/custom-router-emphasized.png)
4. Click **Add new route**.
![Screenshot of custom routing settings with add new route button emphasised](/assets/images/help/notifications/add-new-route-emphasized.png)
5. Click **Pick organization**, then select the organization you want to customize from the dropdown.
![Screenshot of dropdown to pick organization](/assets/images/help/notifications/organization-dropdown-custom-routing-emphasis.png)
6. Select one of your verified email addresses, then click **Save**.
![Screenshot of custom routing page with save button](/assets/images/help/notifications/select-email-address-custom-routing-and-save.png)
{% else %}
3. Under "Custom routing," find your organization's name in the list.
![List of organizations and email addresses](/assets/images/help/notifications/notifications_org_emails.png)
4. Click **Edit** next to the email address you want to change.
![Editing an organization's email addresses](/assets/images/help/notifications/notifications_edit_org_emails.png)
5. Select one of your verified email addresses, then click **Save**.
![Switching your per-org email address](/assets/images/help/notifications/notifications_switching_org_email.gif){% endif %}
## {% data variables.product.prodname_dependabot_alerts %} notification options
{% data reusables.notifications.vulnerable-dependency-notification-enable %}
{% data reusables.notifications.vulnerable-dependency-notification-delivery-method-customization2 %}
{% data reusables.notifications.vulnerable-dependency-notification-options %}
For more information about the notification delivery methods available to you, and advice on optimizing your notifications for {% data variables.product.prodname_dependabot_alerts %}, see "[Configuring notifications for {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts)."
{% ifversion update-notification-settings-22 or ghes %}
## {% data variables.product.prodname_actions %} notification options
Choose how you want to receive workflow run updates for repositories that you are watching that are set up with {% data variables.product.prodname_actions %}. You can also choose to only receive notifications for failed workflow runs.{% endif %}
{% ifversion update-notification-settings-22 %}
![Animated GIF of notification options for {% data variables.product.prodname_actions %}](/assets/images/help/notifications/github-actions-customize-notifications.gif){% endif %}
{% ifversion ghes %}
![Screenshot of the notification options for {% data variables.product.prodname_actions %}](/assets/images/help/notifications-v2/github-actions-notification-options.png){% endif %}
{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
## Organization alerts notification options
If you're an organization owner, you'll receive email notifications by default when organization members add new deploy keys to repositories within the organization. You can unsubscribe from these notifications. On the notification settings page, under "Organization alerts", unselect **Email**.
{% endif %}
{% ifversion fpt or ghes or ghec %}
## Managing your notification settings with {% data variables.product.prodname_mobile %}
When you install {% data variables.product.prodname_mobile %}, you will automatically be opted into web notifications. Within the app, you can enable push notifications for the following events.
- Direct mentions
- Assignments to issues or pull requests
- Requests to review a pull request
- Requests to approve a deployment
You can also schedule when {% data variables.product.prodname_mobile %} will send push notifications to your mobile device.
{% data reusables.mobile.push-notifications-on-ghes %}
### Managing your notification settings with {% data variables.product.prodname_ios %}
1. In the bottom menu, tap **Profile**.
2. To view your settings, tap {% octicon "gear" aria-label="The Gear icon" %}.
3. To update your notification settings, tap **Notifications** and then use the toggles to enable or disable your preferred types of push notifications.
4. Optionally, to schedule when {% data variables.product.prodname_mobile %} will send push notifications to your mobile device, tap **Working Hours**, use the **Custom working hours** toggle, and then choose when you would like to receive push notifications.
### Managing your notification settings with {% data variables.product.prodname_android %}
1. In the bottom menu, tap **Profile**.
2. To view your settings, tap {% octicon "gear" aria-label="The Gear icon" %}.
3. To update your notification settings, tap **Configure Notifications** and then use the toggles to enable or disable your preferred types of push notifications.
4. Optionally, to schedule when {% data variables.product.prodname_mobile %} will send push notifications to your mobile device, tap **Working Hours**, use the **Custom working hours** toggle, and then choose when you would like to receive push notifications.
## Configuring your watch settings for an individual repository with {% data variables.product.prodname_mobile %}
You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of {% ifversion fpt or ghec %}certain event types such as issues, pull requests, discussions (if enabled for the repository) and {% endif %}new releases, or completely ignore an individual repository.
1. On {% data variables.product.prodname_mobile %}, navigate to the main page of the repository.
2. Tap **Watch**.
![The watch button on {% data variables.product.prodname_mobile %}](/assets/images/help/notifications-v2/mobile-watch-button.png)
3. To choose what activities you receive notifications for, tap your preferred watch settings.
![Watch settings dropdown menu in {% data variables.product.prodname_mobile %}](/assets/images/help/notifications-v2/mobile-watch-settings.png)
{% endif %}

View File

@@ -0,0 +1,24 @@
---
title: Настройка уведомлений
intro: 'Чтобы повысить релевантность уведомлений и упростить процесс рассмотрения, настройте уведомления в соответствии с вашими приоритетами.'
redirect_from:
- /articles/getting-started-with-notifications
- /github/managing-subscriptions-and-notifications-on-github/setting-up-notifications
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
children:
- /about-notifications
- /configuring-notifications
ms.openlocfilehash: 7e2b668bbd02e5b9d0307559dca82dda5ae70ee8
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: '145115931'
---

View File

@@ -0,0 +1,78 @@
---
title: Настройка рабочего процесса для рассмотрения уведомлений
intro: 'Чтобы создать идеальный рабочий процесс для рассмотрения уведомлений, можно адаптировать и настроить эти примеры рабочих процессов.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
redirect_from:
- /github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications
- /github/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/customizing-a-workflow-for-triaging-your-notifications
shortTitle: Triage your notifications
ms.openlocfilehash: 9e5771dff52408a1b6967a3792eb36eefebefd72
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145115928'
---
## Запуск рассмотрения папки "Входящие"
Прежде чем приступить к рассмотрению папки "Входящие", подумайте, предпочитаете ли вы сначала находить и реагировать на самые важные обновления или избавить свою папку "Входящие" от отвлекающих обновлений, которые можно легко удалить и рассмотреть.
Вы можете использовать комбинацию обоих методов в разное время в зависимости от объема уведомлений.
Пример рабочего процесса поиска и реагирования на наиболее важные уведомления см. в разделе [Проверка самых высоких приоритетов для уведомлений](#checking-your-highest-notification-priorities).
Пример рабочего процесса удаления уведомлений, которые легко удаляются и рассматриваются, см. в разделе [Очистка наименее важных уведомлений](#clearing-your-least-important-notifications).
## Проверка самых высоких приоритетов уведомлений
Выберите наиболее срочный тип уведомлений и выберите удобное для вас время их проверки. Подумайте над вопросом: "Кого я блокирую?"
Например, вы можете проверять уведомления в этом порядке по утрам во время ежедневного планирования:
- Запросы на вытягивание, в рамках которых запрашивается проверка. (фильтрация по `reason:review-requested`)
- События, в которых используется ваше имя пользователя — @mentioned, также называются "прямыми упоминаниями". (фильтрация по `reason:mention`)
- События, в которых команда, где вы являетесь участником @mentioned, также называются "упоминаниями о команде". (фильтрация по `reason:team-mention`)
- Сбои рабочего процесса CI для определенного репозитория. (выполните фильтрацию по `reason:ci-activity` и `repo:owner/repo-name` убедитесь, что вы включили уведомления о действиях CI для сбоев рабочих процессов в параметрах уведомлений)
{% tip %}
**Совет.** Чтобы быстро просмотреть самые высокие приоритеты, настройте пользовательские фильтры в порядке приоритета их проверки. Дополнительные сведения см. в разделе [Управление уведомлениями из папки «Входящие»](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#customizing-your-inbox-with-custom-filters).
{% endtip %}
## Реагирование на текущие обновления для уведомлений
Чтобы выполнить действие в связи с уведомлениями, можно рассмотреть вопрос "Что у меня было заблокировано, а теперь разблокировано?" Выберите приоритеты при выполнении действий в связи с уведомлениями.
Например, можно выполнить следующие действия в следующем порядке:
- Проблемы и запросы на вытягивание, которые вам назначены. Немедленно закройте все возможные проблемы и запросы на вытягивание и добавьте обновления. При необходимости сохраните уведомления для последующей их проверки.
- Просмотрите уведомления в сохраненной папке "Входящие", особенно непрочитанные обновления. Если поток больше не важен, отмените выбор {% octicon "bookmark" aria-label="The bookmark icon" %}, чтобы удалить уведомление из сохраненной папки "Входящие" и отменить ее сохранение.
## Управление уведомлениями с более низким приоритетом
После рассмотрения уведомлений с более высоким приоритетом просмотрите остальные уведомления, например, уведомления об участии. Обдумайте следующие вопросы:
- Можно ли вы отменить подписку на это уведомление? Завершено ли это уведомление и готово ли к добавлению метки **Готово**?
{% tip %}
**Совет.** Если вы отмените подписку на уведомление, вы не будете получать новые обновления, если только вы не начнете участвовать в потоке, являетесь @mentioned или команда, в которой вы участвуете, является @mentioned. Когда вы добавляете для уведомления метку **Готово**, уведомление удаляется из основного представления папки "Входящие", и его можно просмотреть с помощью запроса `is:read`. Дополнительные сведения см. в разделе [Управление уведомлениями из папки «Входящие»](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#triaging-options).
{% endtip %}
- Вы хотите в будущем получать обновления при закрытии или повторном открытии запроса на вытягивание или при объединении запроса на вытягивание? Дополнительные сведения об этих параметрах см. в разделе [Рассмотрение одного уведомления](/github/managing-subscriptions-and-notifications-on-github/triaging-a-single-notification#customizing-when-to-receive-future-updates-for-an-issue-or-pull-request).
- Хотите запретить получение таких уведомлений в будущем? Если так, то стоит подумать об отмене подписки. Дополнительные сведения см. в разделе [Управление подписками для действий в GitHub](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github).
## Очистка наименее важных уведомлений
Выберите, какой тип уведомлений будет быстрее всего рассмотреть и удалить из папки "Входящие"; в идеале рассматривается несколько уведомлений одновременно.
Например, вы можете удалить уведомления в следующем порядке:
- Уведомления об участии, подписку на которые можно отменить.
- Обновления репозитория, которые не настолько важны, чтобы сохранять их или выполнять действия в связи с ними.
Дополнительные сведения об управлении несколькими уведомлениями в папке "Входящие" см. в разделе [Управление уведомлениями из папки "Входящие"](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#triaging-multiple-notifications-at-the-same-time).
Если это возможно, вы также можете изменить параметры уведомлений или отменить подписку на эти обновления. Дополнительные сведения см. в разделе [Настройка уведомлений](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications) или [Управление подписками для действий в GitHub](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github).

View File

@@ -0,0 +1,27 @@
---
title: Просмотр и прохождение уведомлений
intro: 'Чтобы оптимизировать рабочий процесс уведомлений, можно настроить способ просмотра и рассмотрения уведомлений.'
redirect_from:
- /articles/managing-notifications
- /articles/managing-your-notifications
- /github/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
children:
- /managing-notifications-from-your-inbox
- /triaging-a-single-notification
- /customizing-a-workflow-for-triaging-your-notifications
shortTitle: Customize a workflow
ms.openlocfilehash: a4130fe6877b7071211494226f67906e2870224b
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145115923'
---

View File

@@ -0,0 +1,181 @@
---
title: Managing notifications from your inbox
intro: 'Use your inbox to quickly triage and sync your notifications across email{% ifversion fpt or ghes or ghec %} and mobile{% endif %}.'
redirect_from:
- /articles/marking-notifications-as-read
- /articles/saving-notifications-for-later
- /github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox
- /github/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/managing-notifications-from-your-inbox
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
shortTitle: Manage from your inbox
---
## About your inbox
{% ifversion fpt or ghes or ghec %}
{% data reusables.notifications-v2.notifications-inbox-required-setting %} For more information, see "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#choosing-your-notification-settings)."
{% endif %}
To access your notifications inbox, in the upper-right corner of any page, click {% octicon "bell" aria-label="The notifications bell" %}.
![Notification indicating any unread message](/assets/images/help/notifications/notifications_general_existence_indicator.png)
Your inbox shows all of the notifications that you haven't unsubscribed to or marked as **Done.** You can customize your inbox to best suit your workflow using filters, viewing all or just unread notifications, and grouping your notifications to get a quick overview.
![inbox view](/assets/images/help/notifications-v2/inbox-view.png)
By default, your inbox will show read and unread notifications. To only see unread notifications, click **Unread** or use the `is:unread` query.
![unread inbox view](/assets/images/help/notifications-v2/unread-inbox-view.png)
## Triaging options
You have several options for triaging notifications from your inbox.
| Triaging option | Description |
|-----------------|-------------|
| Save | Saves your notification for later review. To save a notification, to the right of the notification, click {% octicon "bookmark" aria-label="The bookmark icon" %}. <br> <br> Saved notifications are kept indefinitely and can be viewed by clicking **Saved** in the sidebar or with the `is:saved` query. If your saved notification is older than 5 months and becomes unsaved, the notification will disappear from your inbox within a day. |
| Done | Marks a notification as completed and removes the notification from your inbox. You can see all completed notifications by clicking **Done** in the sidebar or with the `is:done` query. Notifications marked as **Done** are saved for 5 months.
| Unsubscribe | Automatically removes the notification from your inbox and unsubscribes you from the conversation until you are @mentioned, a team you're on is @mentioned, or you're requested for review.
| Read | Marks a notification as read. To only view read notifications in your inbox, use the `is:read` query. This query doesn't include notifications marked as **Done**.
| Unread | Marks notification as unread. To only view unread notifications in your inbox, use the `is:unread` query. |
To see the available keyboard shortcuts, see "[Keyboard Shortcuts](/github/getting-started-with-github/keyboard-shortcuts#notifications)."
Before choosing a triage option, you can preview your notification's details first and investigate. For more information, see "[Triaging a single notification](/github/managing-subscriptions-and-notifications-on-github/triaging-a-single-notification)."
## Triaging multiple notifications at the same time
To triage multiple notifications at once, select the relevant notifications and use the {% octicon "kebab-horizontal" aria-label="The edit icon" %} drop-down to choose a triage option.
![Drop-down menu with triage options and selected notifications](/assets/images/help/notifications-v2/triage-multiple-notifications-together.png)
## Default notification filters
By default, your inbox has filters for when you are assigned, participating in a thread, requested to review a pull request, or when your username is @mentioned directly or a team you're a member of is @mentioned.
![Default custom filters](/assets/images/help/notifications-v2/default-filters.png)
## Customizing your inbox with custom filters
You can add up to 15 of your own custom filters.
{% data reusables.notifications.access_notifications %}
2. To open the filter settings, in the left sidebar, next to "Filters", click {% octicon "gear" aria-label="The Gear icon" %}.
{% tip %}
**Tip:** You can quickly preview a filter's inbox results by creating a query in your inbox view and clicking **Save**, which opens the custom filter settings.
{% endtip %}
3. Add a name for your filter and a filter query. For example, to only see notifications for a specific repository, you can create a filter using the query `repo:octocat/open-source-project-name reason:participating`. You can also add emojis with a native emoji keyboard. For a list of supported search queries, see "[Supported queries for custom filters](#supported-queries-for-custom-filters)."
![Custom filter example](/assets/images/help/notifications-v2/custom-filter-example.png)
4. Click **Create**.
## Custom filter limitations
Custom filters do not currently support:
- Full text search in your inbox, including searching for pull request or issue titles.
- Distinguishing between the `is:issue`, `is:pr`, and `is:pull-request` query filters. These queries will return both issues and pull requests.
- Creating more than 15 custom filters.
- Changing the default filters or their order.
- Search [exclusion](/github/searching-for-information-on-github/understanding-the-search-syntax#exclude-certain-results) using `NOT` or `-QUALIFIER`.
## Supported queries for custom filters
These are the types of filters that you can use:
- Filter by repository with `repo:`
- Filter by discussion type with `is:`
- Filter by notification reason with `reason:`{% ifversion fpt or ghec %}
- Filter by notification author with `author:`
- Filter by organization with `org:`{% endif %}
### Supported `repo:` queries
To add a `repo:` filter, you must include the owner of the repository in the query: `repo:owner/repository`. An owner is the organization or the user who owns the {% data variables.product.prodname_dotcom %} asset that triggers the notification. For example, `repo:octo-org/octo-repo` will show notifications triggered in the octo-repo repository within the octo-org organization.
### Supported `is:` queries
To filter notifications for specific activity on {% data variables.location.product_location %}, you can use the `is` query. For example, to only see repository invitation updates, use `is:repository-invitation`{% ifversion not ghae %}, and to only see {% data variables.product.prodname_dependabot_alerts %}, use `is:repository-vulnerability-alert`{% endif %}.
- `is:check-suite`
- `is:commit`
- `is:gist`
- `is:issue-or-pull-request`
- `is:release`
- `is:repository-invitation`
- `is:repository-vulnerability-alert`{% ifversion fpt or ghec %}
- `is:repository-advisory`{% endif %}
- `is:team-discussion`{% ifversion fpt or ghec %}
- `is:discussion`{% endif %}
For information about reducing noise from notifications for {% data variables.product.prodname_dependabot_alerts %}, see "[Configuring notifications for {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts)."
You can also use the `is:` query to describe how the notification was triaged.
- `is:saved`
- `is:done`
- `is:unread`
- `is:read`
### Supported `reason:` queries
To filter notifications by why you've received an update, you can use the `reason:` query. For example, to see notifications when you (or a team you're on) is requested to review a pull request, use `reason:review-requested`. For more information, see "[About notifications](/github/managing-subscriptions-and-notifications-on-github/about-notifications#reasons-for-receiving-notifications)."
| Query | Description |
|-----------------|-------------|
| `reason:assign` | When there's an update on an issue or pull request you've been assigned to.
| `reason:author` | When you opened a pull request or issue and there has been an update or new comment.
| `reason:comment`| When you commented on an issue, pull request, or team discussion.
| `reason:participating` | When you have commented on an issue, pull request, or team discussion or you have been @mentioned.
| `reason:invitation` | When you're invited to a team, organization, or repository.
| `reason:manual` | When you click **Subscribe** on an issue or pull request you weren't already subscribed to.
| `reason:mention` | You were directly @mentioned.
| `reason:review-requested` | You or a team you're on have been requested to review a pull request.
| `reason:security-alert` | When a security alert is issued for a repository.
| `reason:state-change` | When the state of a pull request or issue is changed. For example, an issue is closed or a pull request is merged.
| `reason:team-mention` | When a team you're a member of is @mentioned.
| `reason:ci-activity` | When a repository has a CI update, such as a new workflow run status.
{% ifversion fpt or ghec %}
### Supported `author:` queries
To filter notifications by user, you can use the `author:` query. An author is the original author of the thread (issue, pull request, gist, discussions, and so on) for which you are being notified. For example, to see notifications for threads created by the Octocat user, use `author:octocat`.
### Supported `org:` queries
To filter notifications by organization, you can use the `org` query. The organization you need to specify in the query is the organization of the repository for which you are being notified on {% data variables.product.prodname_dotcom %}. This query is useful if you belong to several organizations, and want to see notifications for a specific organization.
For example, to see notifications from the octo-org organization, use `org:octo-org`.
{% endif %}
## {% data variables.product.prodname_dependabot %} custom filters
{% ifversion fpt or ghec or ghes %}
If you use {% data variables.product.prodname_dependabot %} to keep your dependencies up-to-date, you can use and save these custom filters:
- `is:repository_vulnerability_alert` to show notifications for {% data variables.product.prodname_dependabot_alerts %}.
- `reason:security_alert` to show notifications for {% data variables.product.prodname_dependabot_alerts %} and security update pull requests.
- `author:app/dependabot` to show notifications generated by {% data variables.product.prodname_dependabot %}. This includes {% data variables.product.prodname_dependabot_alerts %}, security update pull requests, and version update pull requests.
For more information about {% data variables.product.prodname_dependabot %}, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)."
{% endif %}
{% ifversion ghae %}
If you use {% data variables.product.prodname_dependabot %} to tell you about insecure dependencies, you can use and save these custom filters to show notifications for {% data variables.product.prodname_dependabot_alerts %}:
- `is:repository_vulnerability_alert`
- `reason:security_alert`
For more information about {% data variables.product.prodname_dependabot %}, see "[About {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)."
{% endif %}

View File

@@ -0,0 +1,47 @@
---
title: Triaging a single notification
intro: 'When you review and investigate a single notification, you have several triaging options that are optimized for the detailed notification view.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Notifications
redirect_from:
- /github/managing-subscriptions-and-notifications-on-github/triaging-a-single-notification
- /github/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/triaging-a-single-notification
shortTitle: Triage a notification
---
## Saving a single notification
To save a single notification to review later, to the right of the notification, click {% octicon "bookmark" aria-label="The bookmark icon" %}. You can only save one notification at a time.
Saved notifications are kept indefinitely and can be viewed by clicking **Saved** in the sidebar or with the `is:saved` query. If your saved notification is older than 5 months and becomes unsaved, the notification will disappear from your inbox within a day.
![Save triaging option](/assets/images/help/notifications-v2/save-triaging-option.png)
## Investigating a notification
When you click an individual notification from your inbox, you're directed to the conversation that prompted the notification. From the top of the page, you can:
- Mark the individual notification as done
- Unsubscribe from future notifications
- Mark the notification as read
- Save the notification for later
- Return to your notifications inbox
For more information about your triage options, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox#triaging-options)."
## Customizing when to receive future updates for an issue or pull request
You can choose how you want to receive future notifications for a specific issue or pull request.
1. In the right column of the issue or pull request, next to "Notifications", click **Customize**.
![Customize option under "Notifications"](/assets/images/help/notifications-v2/customize-notifications-for-specific-thread.png)
2. Select **Custom** and choose when you'd like to receive a notification update for this thread. For example, you can choose to receive an update when the pull request has been merged, closed, or reopened. You will be subscribed again if you participate in the thread, your username is @mentioned, or a team you're a member of is @mentioned.
![Options for customizing notifications](/assets/images/help/notifications-v2/custom-options-for-customizing-notification-thread-updates.png)
3. Click **Save**.

View File

@@ -0,0 +1,35 @@
---
title: About your organization's profile
intro: Your organization's profile page shows basic information about your organization.
redirect_from:
- /articles/about-your-organization-s-profile
- /articles/about-your-organizations-profile
- /github/setting-up-and-managing-your-github-profile/about-your-organizations-profile
- /github/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-organizations-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Organization's profile
---
You can optionally choose to add a description, location, website, and email address for your organization, and pin important repositories.{% ifversion fpt or ghec or ghes > 3.3 %} You can customize your organization's public profile by adding a README.md file. For more information, see "[Customizing your organization's profile](/organizations/collaborating-with-groups-in-organizations/customizing-your-organizations-profile)."{% endif %}
{% ifversion fpt %}
Organizations that use {% data variables.product.prodname_ghe_cloud %} can confirm their organization's identity and display a "Verified" badge on their organization's profile page by verifying the organization's domains with {% data variables.product.product_name %}. For more information, see "[Verifying or approving a domain for your organization](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)" in the {% data variables.product.prodname_ghe_cloud %} documenatation.
{% elsif ghec or ghes %}
To confirm your organization's identity and display a "Verified" badge on your organization profile page, you can verify your organization's domains with {% data variables.product.prodname_dotcom %}. For more information, see "[Verifying or approving a domain for your organization](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)."
{% endif %}
{% ifversion fpt or ghes or ghec %}
![Sample organization profile page](/assets/images/help/organizations/org_profile_with_overview.png)
{% else %}
![Sample organization profile page](/assets/images/help/profile/org_profile.png)
{% endif %}
## Further reading
- "[About organizations](/organizations/collaborating-with-groups-in-organizations/about-organizations)"

View File

@@ -0,0 +1,43 @@
---
title: About your profile
intro: 'Your profile page tells people the story of your work through the repositories you''re interested in, the contributions you''ve made, and the conversations you''ve had.'
redirect_from:
- /articles/viewing-your-feeds
- /articles/profile-pages
- /articles/about-your-profile
- /github/setting-up-and-managing-your-github-profile/about-your-profile
- /github/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
---
You can add personal information about yourself in your bio, like previous places you've worked, projects you've contributed to, or interests you have that other people may like to know about. For more information, see "[Adding a bio to your profile](/articles/personalizing-your-profile/#adding-a-bio-to-your-profile)."
{% ifversion fpt or ghes or ghec %}
{% data reusables.profile.profile-readme %}
![Profile README file displayed on profile](/assets/images/help/repository/profile-with-readme.png)
{% endif %}
People who visit your profile see a timeline of your contribution activity, like issues and pull requests you've opened, commits you've made, and pull requests you've reviewed. You can choose to display only public contributions or to also include private, anonymized contributions. For more information, see "[Viewing contributions on your profile page](/articles/viewing-contributions-on-your-profile-page)" or "[Publicizing or hiding your private contributions on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)."
People who visit your profile can also see the following information.
- Repositories and gists you own or contribute to. {% ifversion fpt or ghes or ghec %}You can showcase your best work by pinning repositories and gists to your profile. For more information, see "[Pinning items to your profile](/github/setting-up-and-managing-your-github-profile/pinning-items-to-your-profile)."{% endif %}
- Repositories you've starred{% ifversion fpt or ghec %} and organized into lists{% endif %}. For more information, see "[Saving repositories with stars](/articles/saving-repositories-with-stars/)."
- An overview of your activity in organizations, repositories, and teams you're most active in. For more information, see "[Showing an overview of your activity on your profile](/articles/showing-an-overview-of-your-activity-on-your-profile)."{% ifversion fpt or ghec %}
- Badges and Achievements that highlight your activity and show if you use {% data variables.product.prodname_pro %} or participate in programs like the {% data variables.product.prodname_arctic_vault %}, {% data variables.product.prodname_sponsors %}, or the {% data variables.product.company_short %} Developer Program. For more information, see "[Personalizing your profile](/github/setting-up-and-managing-your-github-profile/personalizing-your-profile#displaying-badges-on-your-profile)."{% endif %}
You can also set a status on your profile to provide information about your availability. For more information, see "[Setting a status](/articles/personalizing-your-profile/#setting-a-status)."
## Further reading
- "[How do I set up my profile picture?](/articles/how-do-i-set-up-my-profile-picture)"
- "[Publicizing or hiding your private contributions on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)"
- "[Viewing contributions on your profile](/articles/viewing-contributions-on-your-profile)"

View File

@@ -0,0 +1,28 @@
---
title: Настройка профиля
intro: 'Вы можете настроить свой профиль, чтобы другие пользователи могли понять, кто вы и какую работу выполняете.'
redirect_from:
- /articles/customizing-your-profile
- /github/setting-up-and-managing-your-github-profile/customizing-your-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
children:
- /about-your-profile
- /about-your-organizations-profile
- /personalizing-your-profile
- /managing-your-profile-readme
- /pinning-items-to-your-profile
- /setting-your-profile-to-private
ms.openlocfilehash: 617625a9e51fa44f5f1e291b5c3828b1c403b5bc
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145117195'
---

View File

@@ -0,0 +1,77 @@
---
title: Managing your profile README
intro: 'You can add a README to your {% data variables.product.prodname_dotcom %} profile to tell other people about yourself.'
versions:
fpt: '*'
ghes: '*'
ghec: '*'
topics:
- Profiles
redirect_from:
- /github/setting-up-and-managing-your-github-profile/managing-your-profile-readme
- /github/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme
shortTitle: Your profile README
---
## About your profile README
You can share information about yourself with the community on {% data variables.location.product_location %} by creating a profile README. {% data variables.product.prodname_dotcom %} shows your profile README at the top of your profile page.
You decide what information to include in your profile README, so you have full control over how you present yourself on {% data variables.product.prodname_dotcom %}. Here are some examples of information that visitors may find interesting, fun, or useful in your profile README.
- An "About me" section that describes your work and interests
- Contributions you're proud of, and context about those contributions
- Guidance for getting help in communities where you're involved
![Profile README file displayed on profile](/assets/images/help/repository/profile-with-readme.png)
You can format text and include emoji, images, and GIFs in your profile README by using {% data variables.product.company_short %} Flavored Markdown. For more information, see "[Getting started with writing and formatting on {% data variables.product.prodname_dotcom %}](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github)." For a hands-on guide to customizing your profile README, see "[Quickstart for writing on {% data variables.product.prodname_dotcom %}](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github)."
## Prerequisites
GitHub will display your profile README on your profile page if all of the following are true.
- You've created a repository with a name that matches your {% data variables.product.prodname_dotcom %} username.
- The repository is public.
- The repository contains a file named README.md in its root.
- The README.md file contains any content.
{% note %}
**Note**: If you created a public repository with the same name as your username before July 2020, {% data variables.product.prodname_dotcom %} won't automatically show the repository's README on your profile. You can manually share the repository's README to your profile by going to the repository on {% data variables.product.prodname_dotcom_the_website %} and clicking **Share to profile**.
![Button to share README to profile](/assets/images/help/repository/share-to-profile.png)
{% endnote %}
## Adding a profile README
{% data reusables.repositories.create_new %}
2. Under "Repository name", type a repository name that matches your {% data variables.product.prodname_dotcom %} username. For example, if your username is "octocat", the repository name must be "octocat".
![Repository name field which matches username](/assets/images/help/repository/repo-username-match.png)
3. Optionally, add a description of your repository. For example, "My personal repository."
![Field for entering a repository description](/assets/images/help/repository/create-personal-repository-desc.png)
4. Select **Public**.
![Radio button to select visibility with public selected](/assets/images/help/repository/create-personal-repository-visibility.png)
{% data reusables.repositories.initialize-with-readme %}
{% data reusables.repositories.create-repo %}
7. Above the right sidebar, click **Edit README**.
![Button to edit README file](/assets/images/help/repository/personal-repository-edit-readme.png)
The generated README file is pre-populated with a template to give you some inspiration for your profile README.
![README file with pre-populated template](/assets/images/help/repository/personal-repository-readme-template.png)
For a summary of all the available emojis and their codes, see "[Emoji cheat sheet](https://www.webfx.com/tools/emoji-cheat-sheet/)."
## Removing a profile README
The profile README is removed from your {% data variables.product.prodname_dotcom %} profile if any of the following apply:
- The README file is empty or doesn't exist.
- The repository is private.
- The repository name no longer matches your username.
The method you choose depends upon your needs, but if you're unsure, we recommend making your repository private. For steps on how to make your repository private, see "[Changing a repository's visibility](/github/administering-a-repository/setting-repository-visibility#changing-a-repositorys-visibility)."
## Further reading
- [About READMEs](/github/creating-cloning-and-archiving-repositories/about-readmes)

View File

@@ -0,0 +1,273 @@
---
title: Personalizing your profile
intro: 'You can share information about yourself with other {% data variables.product.product_name %} users by setting a profile picture and adding a bio to your profile.'
redirect_from:
- /articles/adding-a-bio-to-your-profile
- /articles/setting-your-profile-picture
- /articles/how-do-i-set-up-my-profile-picture
- /articles/gravatar-problems
- /articles/how-do-i-set-up-my-avatar
- /articles/personalizing-your-profile
- /github/setting-up-and-managing-your-github-profile/personalizing-your-profile
- /github/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Personalize
---
## Changing your profile picture
Your profile picture helps identify you across {% data variables.product.product_name %} in pull requests, comments, contributions pages, and graphs.
When you sign up for an account, {% data variables.product.product_name %} provides you with a randomly generated "identicon". [Your identicon](https://github.com/blog/1586-identicons) generates from a hash of your user ID, so there's no way to control its color or pattern. You can replace your identicon with an image that represents you.
{% note %}
**Note{% ifversion ghec %}s{% endif %}**: {% ifversion ghec %}
* {% endif %}Your profile picture should be a PNG, JPG, or GIF file, and it must be less than 1 MB in size and smaller than 3000 by 3000 pixels. For the best quality rendering, we recommend keeping the image at about 500 by 500 pixels.
{% ifversion ghec %}* Gravatar profile pictures are not supported with {% data variables.product.prodname_emus %}.{% endif %}
{% endnote %}
### Setting a profile picture
{% data reusables.user-settings.access_settings %}
2. Under **Profile Picture**, click {% octicon "pencil" aria-label="The edit icon" %} **Edit**.
![Edit profile picture](/assets/images/help/profile/edit-profile-photo.png)
3. Click **Upload a photo...**.{% ifversion not ghae %}
![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png){% endif %}
3. Crop your picture. When you're done, click **Set new profile picture**.
![Crop uploaded photo](/assets/images/help/profile/avatar_crop_and_save.png)
### Resetting your profile picture to the identicon
{% data reusables.user-settings.access_settings %}
2. Under **Profile Picture**, click {% octicon "pencil" aria-label="The edit icon" %} **Edit**.
![Edit profile picture](/assets/images/help/profile/edit-profile-photo.png)
3. To revert to your identicon, click **Remove photo**. {% ifversion not ghae %}If your email address is associated with a [Gravatar](https://en.gravatar.com/), you cannot revert to your identicon. Click **Revert to Gravatar** instead.
![Update profile picture](/assets/images/help/profile/edit-profile-picture-options.png){% endif %}
## Changing your profile name
You can change the name that is displayed on your profile. This name may also be displayed next to comments you make on private repositories owned by an organization. For more information, see "[Managing the display of member names in your organization](/articles/managing-the-display-of-member-names-in-your-organization)."
{% ifversion fpt or ghec %}
{% note %}
**Note:** If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, any changes to your profile name must be made through your identity provider instead of {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% endnote %}
{% endif %}
{% data reusables.user-settings.access_settings %}
2. Under "Name", type the name you want to be displayed on your profile.
![Name field in profile settings](/assets/images/help/profile/name-field.png)
## Adding a bio to your profile
Add a bio to your profile to share information about yourself with other {% data variables.product.product_name %} users. With the help of [@mentions](/articles/basic-writing-and-formatting-syntax) and emoji, you can include information about where you currently or have previously worked, what type of work you do, or even what kind of coffee you drink.
{% ifversion fpt or ghes or ghec %}
For a longer-form and more prominent way of displaying customized information about yourself, you can also use a profile README. For more information, see "[Managing your profile README](/github/setting-up-and-managing-your-github-profile/managing-your-profile-readme)."
{% endif %}
{% note %}
**Note:**
If you have the activity overview section enabled for your profile and you @mention an organization you're a member of in your profile bio, then that organization will be featured first in your activity overview. For more information, see "[Showing an overview of your activity on your profile](/articles/showing-an-overview-of-your-activity-on-your-profile)."
{% endnote %}
{% data reusables.user-settings.access_settings %}
2. Under **Bio**, add the content that you want displayed on your profile. The bio field is limited to 160 characters.
![Update bio on profile](/assets/images/help/profile/bio-field.png)
{% tip %}
**Tip:** When you @mention an organization, only those that you're a member of will autocomplete. You can still @mention organizations that you're not a member of, like a previous employer, but the organization name won't autocomplete for you.
{% endtip %}
{% data reusables.profile.update-profile %}
{% ifversion profile-time-zone %}
## Setting your location and time zone
You can set a location and time zone on your profile to show other people your local time. Your location and time zone will be visible:
- on your {% data variables.product.product_name %} profile page.
- when people hover over your username or avatar on {% data variables.product.product_name %}.
When you view your profile, you will see your location, local time, and your time zone in relation to Universal Time Coordinated.
![Screenshot of the Octocat profile page emphasizing the location, local time, and time zone fields.](/assets/images/help/profile/profile-location-and-time.png)
When others view your profile, they will see your location, local time, and the time difference in hours from their own local time.
![Screenshot of the Octocat profile page emphasizing the location, local time, and relative time fields.](/assets/images/help/profile/profile-relative-time.png)
{% data reusables.user-settings.access_settings %}
1. Under **Location**, type the location you want to be displayed on your profile.
![Screenshot of the location and local time settings emphasizing the location field.](/assets/images/help/profile/location-field.png)
1. Optionally, to display the current local time on your profile, select **Display current local time**.
![Screenshot of the location and local time settings emphasizing the display current local time checkbox.](/assets/images/help/profile/display-local-time-checkbox.png)
- Select the **Time zone** dropdown menu, then click your local time zone.
![Screenshot of the location and local time settings emphasizing the time zone dropdown menu.](/assets/images/help/profile/time-zone-dropdown.png)
{% data reusables.profile.update-profile %}
{% endif %}
## Setting a status
You can set a status to display information about your current availability on {% data variables.product.product_name %}. Your status will show:
- on your {% data variables.product.product_name %} profile page.
- when people hover over your username or avatar on {% data variables.product.product_name %}.
- on a team page for a team where you're a team member. For more information, see "[About teams](/articles/about-teams/#team-pages)."
- on the organization dashboard in an organization where you're a member. For more information, see "[About your organization dashboard](/articles/about-your-organization-dashboard/)."
When you set your status, you can also let people know that you have limited availability on {% data variables.product.product_name %}.
![At-mentioned username shows "busy" note next to username](/assets/images/help/profile/username-with-limited-availability-text.png)
![Requested reviewer shows "busy" note next to username](/assets/images/help/profile/request-a-review-limited-availability-status.png)
If you select the "Busy" option, when people @mention your username, assign you an issue or pull request, or request a pull request review from you, a note next to your username will show that you're busy. You will also be excluded from automatic review assignment for pull requests assigned to any teams you belong to. For more information, see "[Managing code review settings for your team](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)."
1. In the top right corner of {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% else %}{% data variables.product.product_name %}{% endif %}, click your profile photo, then click **Set status** or, if you already have a status set, click your current status.
![Button on profile to set your status](/assets/images/help/profile/set-status-on-profile.png)
2. To add custom text to your status, click in the text field and type a status message.
![Field to type a status message](/assets/images/help/profile/type-a-status-message.png)
3. Optionally, to set an emoji status, click the smiley icon and select an emoji from the list.
![Button to select an emoji status](/assets/images/help/profile/select-emoji-status.png)
4. Optionally, if you'd like to share that you have limited availability, select "Busy."
![Busy option selected in Edit status options](/assets/images/help/profile/limited-availability-status.png)
5. Use the **Clear status** drop-down menu, and select when you want your status to expire. If you don't select a status expiration, you will keep your status until you clear or edit your status.
![Drop down menu to choose when your status expires](/assets/images/help/profile/status-expiration.png)
6. Use the drop-down menu and click the organization you want your status visible to. If you don't select an organization, your status will be public.
![Drop down menu to choose who your status is visible to](/assets/images/help/profile/status-visibility.png)
7. Click **Set status**.
![Button to set status](/assets/images/help/profile/set-status-button.png)
{% ifversion fpt or ghec %}
## Displaying badges on your profile
When you participate in certain programs, {% data variables.product.prodname_dotcom %} automatically displays a badge on your profile.
| Badge | Program | Description |
| --- | --- | --- |
| {% octicon "cpu" aria-label="The Developer Program icon" %} | **Developer Program Member** | If you're a registered member of the {% data variables.product.prodname_dotcom %} Developer Program, building an app with the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API, you'll get a Developer Program Member badge on your profile. For more information on the {% data variables.product.prodname_dotcom %} Developer Program, see [GitHub Developer](/program/). |
| {% octicon "star-fill" aria-label="The star icon" %} | **Pro** | If you use {% data variables.product.prodname_pro %} you'll get a PRO badge on your profile. For more information about {% data variables.product.prodname_pro %}, see "[{% data variables.product.prodname_dotcom %}'s products](/github/getting-started-with-github/githubs-products#github-pro)." |
| {% octicon "lock" aria-label="The lock icon" %} | **Security Bug Bounty Hunter** | If you helped out hunting down security vulnerabilities, you'll get a Security Bug Bounty Hunter badge on your profile. For more information about the {% data variables.product.prodname_dotcom %} Security program, see [{% data variables.product.prodname_dotcom %} Security](https://bounty.github.com/). |
| {% octicon "mortar-board" aria-label="The mortar-board icon" %} | **{% data variables.product.prodname_dotcom %} Campus Expert** | If you participate in the {% data variables.product.prodname_campus_program %}, you will get a {% data variables.product.prodname_dotcom %} Campus Expert badge on your profile. For more information about the Campus Experts program, see [Campus Experts](https://education.github.com/experts). |
| {% octicon "shield" aria-label="The shield icon" %} | **Security advisory credit** | If a security advisory you submit to the [{% data variables.product.prodname_dotcom %} Advisory Database](https://github.com/advisories) is accepted, you'll get a Security advisory credit badge on your profile. For more information about {% data variables.product.prodname_dotcom %} Security Advisories, see [{% data variables.product.prodname_dotcom %} Security Advisories](/code-security/repository-security-advisories/about-github-security-advisories-for-repositories). |
| {% octicon "check" aria-label="The check icon" %} | **Discussion answered** | If your reply to a discussion is marked as the answer, you'll get a Discussion answered badge on your profile. For more information about {% data variables.product.prodname_dotcom %} Discussions, see [About discussions](/discussions/collaborating-with-your-community-using-discussions/about-discussions). |
{% endif %}
{% ifversion fpt or ghec %}
## Earning Achievements
Achievements celebrate specific events and actions that happen on {% data variables.product.prodname_dotcom %}. They will appear as small badges listed in the sidebar of your profile. Clicking or hovering on an achievement will show a detailed view that hints at how the achievement was earned, with a short description and links to the contributing events. The event links will only be visible to users that have access to the repository or organization that the event took place in. Event links will appear inaccessible to all users without access.
To stop private contributions from counting toward your Achievements, or to turn off Achievements entirely, see "[Showing your private contributions and Achievements on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)."
{% note %}
**Note:** This feature is currently in beta and subject to change.
{% endnote %}
{% endif %}
## List of qualifying repositories for Mars 2020 Helicopter Contributor achievement
If you authored any commit(s) present in the commit history for the listed tag of one or more of the repositories below, you'll receive the Mars 2020 Helicopter Contributor achievement on your profile. The authored commit must be with a verified email address, associated with your account at the time {% data variables.product.prodname_dotcom %} determined the eligible contributions, in order to be attributed to you. You can be the original author or [one of the co-authors](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors) of the commit. Future changes to verified emails will not have an effect on the badge. We built the list based on information received from NASA's Jet Propulsion Laboratory.
| {% data variables.product.prodname_dotcom %} Repository | Version | Tag |
|---|---|---|
| [torvalds/linux](https://github.com/torvalds/linux) | 3.4 | [v3.4](https://github.com/torvalds/linux/releases/tag/v3.4) |
| [python/cpython](https://github.com/python/cpython) | 3.9.2 | [v3.9.2](https://github.com/python/cpython/releases/tag/v3.9.2) |
| [boto/boto3](https://github.com/boto/boto3) | 1.17.17 | [1.17.17](https://github.com/boto/boto3/releases/tag/1.17.17) |
| [boto/botocore](https://github.com/boto/botocore) | 1.20.11 | [1.20.11](https://github.com/boto/botocore/releases/tag/1.20.11) |
| [certifi/python-certifi](https://github.com/certifi/python-certifi) | 2020.12.5 | [2020.12.05](https://github.com/certifi/python-certifi/releases/tag/2020.12.05) |
| [chardet/chardet](https://github.com/chardet/chardet) | 4.0.0 | [4.0.0](https://github.com/chardet/chardet/releases/tag/4.0.0) |
| [matplotlib/cycler](https://github.com/matplotlib/cycler) | 0.10.0 | [v0.10.0](https://github.com/matplotlib/cycler/releases/tag/v0.10.0) |
| [elastic/elasticsearch-py](https://github.com/elastic/elasticsearch-py) | 6.8.1 | [6.8.1](https://github.com/elastic/elasticsearch-py/releases/tag/6.8.1) |
| [ianare/exif-py](https://github.com/ianare/exif-py) | 2.3.2 | [2.3.2](https://github.com/ianare/exif-py/releases/tag/2.3.2) |
| [kjd/idna](https://github.com/kjd/idna) | 2.10 | [v2.10](https://github.com/kjd/idna/releases/tag/v2.10) |
| [jmespath/jmespath.py](https://github.com/jmespath/jmespath.py) | 0.10.0 | [0.10.0](https://github.com/jmespath/jmespath.py/releases/tag/0.10.0) |
| [nucleic/kiwi](https://github.com/nucleic/kiwi) | 1.3.1 | [1.3.1](https://github.com/nucleic/kiwi/releases/tag/1.3.1) |
| [matplotlib/matplotlib](https://github.com/matplotlib/matplotlib) | 3.3.4 | [v3.3.4](https://github.com/matplotlib/matplotlib/releases/tag/v3.3.4) |
| [numpy/numpy](https://github.com/numpy/numpy) | 1.20.1 | [v1.20.1](https://github.com/numpy/numpy/releases/tag/v1.20.1) |
| [opencv/opencv-python](https://github.com/opencv/opencv-python) | 4.5.1.48 | [48](https://github.com/opencv/opencv-python/releases/tag/48) |
| [python-pillow/Pillow](https://github.com/python-pillow/Pillow) | 8.1.0 | [8.1.0](https://github.com/python-pillow/Pillow/releases/tag/8.1.0) |
| [pycurl/pycurl](https://github.com/pycurl/pycurl) | 7.43.0.6 | [REL_7_43_0_6](https://github.com/pycurl/pycurl/releases/tag/REL_7_43_0_6) |
| [pyparsing/pyparsing](https://github.com/pyparsing/pyparsing) | 2.4.7 | [pyparsing_2.4.7](https://github.com/pyparsing/pyparsing/releases/tag/pyparsing_2.4.7) |
| [pyserial/pyserial](https://github.com/pyserial/pyserial) | 3.5 | [v3.5](https://github.com/pyserial/pyserial/releases/tag/v3.5) |
| [dateutil/dateutil](https://github.com/dateutil/dateutil) | 2.8.1 | [2.8.1](https://github.com/dateutil/dateutil/releases/tag/2.8.1) |
| [yaml/pyyaml ](https://github.com/yaml/pyyaml) | 5.4.1 | [5.4.1](https://github.com/yaml/pyyaml/releases/tag/5.4.1) |
| [psf/requests](https://github.com/psf/requests) | 2.25.1 | [v2.25.1](https://github.com/psf/requests/releases/tag/v2.25.1) |
| [boto/s3transfer](https://github.com/boto/s3transfer) | 0.3.4 | [0.3.4](https://github.com/boto/s3transfer/releases/tag/0.3.4) |
| [enthought/scimath](https://github.com/enthought/scimath) | 4.2.0 | [4.2.0](https://github.com/enthought/scimath/releases/tag/4.2.0) |
| [scipy/scipy](https://github.com/scipy/scipy) | 1.6.1 | [v1.6.1](https://github.com/scipy/scipy/releases/tag/v1.6.1) |
| [benjaminp/six](https://github.com/benjaminp/six) | 1.15.0 | [1.15.0](https://github.com/benjaminp/six/releases/tag/1.15.0) |
| [enthought/traits](https://github.com/enthought/traits) | 6.2.0 | [6.2.0](https://github.com/enthought/traits/releases/tag/6.2.0) |
| [urllib3/urllib3](https://github.com/urllib3/urllib3) | 1.26.3 | [1.26.3](https://github.com/urllib3/urllib3/releases/tag/1.26.3) |
| [python-attrs/attrs](https://github.com/python-attrs/attrs) | 19.3.0 | [19.3.0](https://github.com/python-attrs/attrs/releases/tag/19.3.0) |
| [CheetahTemplate3/cheetah3](https://github.com/CheetahTemplate3/cheetah3/) | 3.2.4 | [3.2.4](https://github.com/CheetahTemplate3/cheetah3/releases/tag/3.2.4) |
| [pallets/click](https://github.com/pallets/click) | 7.0 | [7.0](https://github.com/pallets/click/releases/tag/7.0) |
| [pallets/flask](https://github.com/pallets/flask) | 1.1.1 | [1.1.1](https://github.com/pallets/flask/releases/tag/1.1.1) |
| [flask-restful/flask-restful](https://github.com/flask-restful/flask-restful) | 0.3.7 | [0.3.7](https://github.com/flask-restful/flask-restful/releases/tag/0.3.7) |
| [pytest-dev/iniconfig](https://github.com/pytest-dev/iniconfig) | 1.0.0 | [v1.0.0](https://github.com/pytest-dev/iniconfig/releases/tag/v1.0.0) |
| [pallets/itsdangerous](https://github.com/pallets/itsdangerous) | 1.1.0 | [1.1.0](https://github.com/pallets/itsdangerous/releases/tag/1.1.0) |
| [pallets/jinja](https://github.com/pallets/jinja) | 2.10.3 | [2.10.3](https://github.com/pallets/jinja/releases/tag/2.10.3) |
| [lxml/lxml](https://github.com/lxml/lxml) | 4.4.1 | [lxml-4.4.1](https://github.com/lxml/lxml/releases/tag/lxml-4.4.1) |
| [Python-Markdown/markdown](https://github.com/Python-Markdown/markdown) | 3.1.1 | [3.1.1](https://github.com/Python-Markdown/markdown/releases/tag/3.1.1) |
| [pallets/markupsafe](https://github.com/pallets/markupsafe) | 1.1.1 | [1.1.1](https://github.com/pallets/markupsafe/releases/tag/1.1.1) |
| [pypa/packaging](https://github.com/pypa/packaging) | 19.2 | [19.2](https://github.com/pypa/packaging/releases/tag/19.2) |
| [pexpect/pexpect](https://github.com/pexpect/pexpect) | 4.7.0 | [4.7.0](https://github.com/pexpect/pexpect/releases/tag/4.7.0) |
| [pytest-dev/pluggy](https://github.com/pytest-dev/pluggy) | 0.13.0 | [0.13.0](https://github.com/pytest-dev/pluggy/releases/tag/0.13.0) |
| [pexpect/ptyprocess](https://github.com/pexpect/ptyprocess) | 0.6.0 | [0.6.0](https://github.com/pexpect/ptyprocess/releases/tag/0.6.0) |
| [pytest-dev/py](https://github.com/pytest-dev/py) | 1.8.0 | [1.8.0](https://github.com/pytest-dev/py/releases/tag/1.8.0) |
| [pyparsing/pyparsing](https://github.com/pyparsing/pyparsing) | 2.4.5 | [pyparsing_2.4.5](https://github.com/pyparsing/pyparsing/releases/tag/pyparsing_2.4.5) |
| [pytest-dev/pytest](https://github.com/pytest-dev/pytest) | 5.3.0 | [5.3.0](https://github.com/pytest-dev/pytest/releases/tag/5.3.0) |
| [stub42/pytz](https://github.com/stub42/pytz) | 2019.3 | [release_2019.3](https://github.com/stub42/pytz/releases/tag/release_2019.3) |
| [uiri/toml](https://github.com/uiri/toml) | 0.10.0 | [0.10.0](https://github.com/uiri/toml/releases/tag/0.10.0) |
| [pallets/werkzeug](https://github.com/pallets/werkzeug) | 0.16.0 | [0.16.0](https://github.com/pallets/werkzeug/releases/tag/0.16.0) |
| [dmnfarrell/tkintertable](https://github.com/dmnfarrell/tkintertable) | 1.2 | [v1.2](https://github.com/dmnfarrell/tkintertable/releases/tag/v1.2) |
| [wxWidgets/wxPython-Classic](https://github.com/wxWidgets/wxPython-Classic) | 2.9.1.1 | [wxPy-2.9.1.1](https://github.com/wxWidgets/wxPython-Classic/releases/tag/wxPy-2.9.1.1) |
| [nasa/fprime](https://github.com/nasa/fprime) | 1.3 | [NASA-v1.3](https://github.com/nasa/fprime/releases/tag/NASA-v1.3) |
| [nucleic/cppy](https://github.com/nucleic/cppy) | 1.1.0 | [1.1.0](https://github.com/nucleic/cppy/releases/tag/1.1.0) |
| [opencv/opencv](https://github.com/opencv/opencv) | 4.5.1 | [4.5.1](https://github.com/opencv/opencv/releases/tag/4.5.1) |
| [curl/curl](https://github.com/curl/curl) | 7.72.0 | [curl-7_72_0](https://github.com/curl/curl/releases/tag/curl-7_72_0) |
| [madler/zlib](https://github.com/madler/zlib) | 1.2.11 | [v1.2.11](https://github.com/madler/zlib/releases/tag/v1.2.11) |
| [apache/lucene](https://github.com/apache/lucene) | 7.7.3 | [releases/lucene-solr/7.7.3](https://github.com/apache/lucene/releases/tag/releases%2Flucene-solr%2F7.7.3) |
| [yaml/libyaml](https://github.com/yaml/libyaml) | 0.2.5 | [0.2.5](https://github.com/yaml/libyaml/releases/tag/0.2.5) |
| [elastic/elasticsearch](https://github.com/elastic/elasticsearch) | 6.8.1 | [v6.8.1](https://github.com/elastic/elasticsearch/releases/tag/v6.8.1) |
| [twbs/bootstrap](https://github.com/twbs/bootstrap) | 4.3.1 | [v4.3.1](https://github.com/twbs/bootstrap/releases/tag/v4.3.1) |
| [vuejs/vue](https://github.com/vuejs/vue) | 2.6.10 | [v2.6.10](https://github.com/vuejs/vue/releases/tag/v2.6.10) |
| [carrotsearch/hppc](https://github.com/carrotsearch/hppc) | 0.7.1 | [0.7.1](https://github.com/carrotsearch/hppc/releases/tag/0.7.1) |
| [JodaOrg/joda-time](https://github.com/JodaOrg/joda-time) | 2.10.1 | [v2.10.1](https://github.com/JodaOrg/joda-time/releases/tag/v2.10.1) |
| [tdunning/t-digest](https://github.com/tdunning/t-digest) | 3.2 | [t-digest-3.2](https://github.com/tdunning/t-digest/releases/tag/t-digest-3.2) |
| [HdrHistogram/HdrHistogram](https://github.com/HdrHistogram/HdrHistogram) | 2.1.9 | [HdrHistogram-2.1.9](https://github.com/HdrHistogram/HdrHistogram/releases/tag/HdrHistogram-2.1.9) |
| [locationtech/spatial4j](https://github.com/locationtech/spatial4j) | 0.7 | [spatial4j-0.7](https://github.com/locationtech/spatial4j/releases/tag/spatial4j-0.7) |
| [locationtech/jts](https://github.com/locationtech/jts) | 1.15.0 | [jts-1.15.0](https://github.com/locationtech/jts/releases/tag/jts-1.15.0) |
| [apache/logging-log4j2](https://github.com/apache/logging-log4j2) | 2.11 | [log4j-2.11.0](https://github.com/apache/logging-log4j2/releases/tag/log4j-2.11.0) |
## Further reading
- "[About your profile](/articles/about-your-profile)"

View File

@@ -0,0 +1,45 @@
---
title: Закрепление элементов в профиле
intro: 'Вы можете закрепить объекты gist и репозитории в своем профиле, чтобы другие пользователи могли быстро просмотреть вашу лучшую работу.'
redirect_from:
- /articles/pinning-repositories-to-your-profile
- /articles/pinning-items-to-your-profile
- /github/setting-up-and-managing-your-github-profile/pinning-items-to-your-profile
- /github/setting-up-and-managing-your-github-profile/customizing-your-profile/pinning-items-to-your-profile
versions:
fpt: '*'
ghes: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Pin items
ms.openlocfilehash: 131bdb1ed57383e0b420308a96742a573dd9aa14
ms.sourcegitcommit: 5b1461b419dbef60ae9dbdf8e905a4df30fc91b7
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: '145070073'
---
Если вы владеете общедоступным репозиторием или внесли в него вклад, вы можете его закрепить. Фиксации в вилках не считаются вкладами, поэтому закрепить вилку, которая вам не принадлежит, нельзя. Дополнительные сведения см. в разделе [Почему мои вклады не отображаются в моем профиле?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)
Вы можете закрепить любой принадлежащий вам общедоступный gist.
В закрепленных элементах содержатся такие важные сведения, как количество звезд, полученных репозиторием, или первые несколько строк gist. После закрепления элементов в профиле вместо раздела "Популярные репозитории" появляется раздел "Закрепленные".
Порядок элементов в разделе "Закрепленные" можно изменить. В правом верхнем углу маркера щелкните {% octicon "grabber" aria-label="The grabber symbol" %} и перетащите маркер в новое место.
{% data reusables.profile.access_profile %}
2. В разделе "Популярные репозитории" или "Закрепленные" щелкните **Настроить закрепленные элементы**.
![Кнопка "Настроить закрепленные элементы"](/assets/images/help/profile/customize-pinned-repositories.png)
3. Чтобы отобразить список элементов для закрепления с возможностью поиска, выберите "Репозитории", "Gists" или оба элемента.
![Флажки для выбора типа отображаемых элементов](/assets/images/help/profile/pinned-repo-picker.png)
4. При необходимости, чтобы упростить поиск определенного элемента, в поле фильтра введите имя пользователя, организации, репозитория или gist.
![Фильтрация элементов](/assets/images/help/profile/pinned-repo-search.png)
5. Выберите сочетание репозиториев и элементов gists (не более шести) для отображения.
![Выбор элементов](/assets/images/help/profile/select-items-to-pin.png)
6. Нажмите кнопку **Сохранить закрепленные**.
![Кнопка "Сохранить закрепленные"](/assets/images/help/profile/save-pinned-repositories.png)
## Дополнительные материалы
- [Сведения о профиле](/articles/about-your-profile)

View File

@@ -0,0 +1,62 @@
---
title: Как сделать профиль частным
intro: Частный профиль отображает только ограниченную информацию и скрывает некоторые действия.
versions:
fpt: '*'
topics:
- Profiles
shortTitle: Set profile to private
ms.openlocfilehash: c00718c84d99de95a9ca1352f32954279906451d
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/25/2022
ms.locfileid: '148008672'
---
## Сведения о частных профилях
Чтобы скрыть некоторые фрагменты страницы профиля, его можно сделать частным. При этом также будет скрыта история ваших действий в различных социальных каналах {% data variables.product.prodname_dotcom_the_website %}. Содержимое частного профиля скрыто от всех пользователей. В настоящее время нет возможности предоставить доступ к сведениям о ваших действиях отдельным пользователям.
Сделав свой профиль частным, вы все равно будете видеть все данные в нем.
Для частных профилей нельзя направлять спонсорские предложения в рамках программы [{% data variables.product.prodname_sponsors %}](/sponsors/getting-started-with-github-sponsors/about-github-sponsors). Участвовать в программе {% data variables.product.prodname_sponsors %} могут только общедоступные профили.
## Различия между частными и общедоступными профилями
На странице частных профилей скрываются следующие сведения:
- достижения и основные моменты;
- обзор действий и веб-канал действий;
- диаграмма вкладов;
- количество подписчиков и собственных подписок;
- кнопки «Подписаться» и «Спонсор»;
- участие в организациях;
- звезды, проекты, пакеты и вкладки спонсорских предложений.
{% note %}
**Примечание.** В частных профилях некоторые поля остаются общедоступными, например README, биография и фотография профиля.
{% endnote %}
## Изменения в отчетах о действиях
Если сделать профиль частным, сведения о прошлых действиях не удаляются и не скрываются. Этот параметр применяется только к действиям, которые совершаются, когда он включен.
В частном профиле сведения о действиях в {% data variables.product.prodname_dotcom_the_website %} не отображаются в следующих местах:
- веб-каналы действий для других пользователей;
- списки популярных обсуждений;
- страница [Популярные](https://github.com/trending).
{% note %}
**Примечание.** Сведения о ваших действиях в общедоступных репозиториях по-прежнему будут видны для всех пользователей, просматривающих эти репозитории, а некоторые такие данные останутся доступными через API {% data variables.product.prodname_dotcom %}.
{% endnote %}
## Изменение параметров конфиденциальности профиля
{% data reusables.user-settings.access_settings %}
1. В разделе «Вклады и действия» установите флажок **Сделать профиль частным и скрыть сведения о действиях**.
{% data reusables.user-settings.update-preferences %}

View File

@@ -0,0 +1,25 @@
---
title: Настройка профиля GitHub и управление им
intro: Вы можете настроить профиль GitHub и управлять графом вклада.
shortTitle: Profiles
redirect_from:
- /categories/setting-up-and-managing-your-github-profile
- /github/setting-up-and-managing-your-github-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
children:
- /customizing-your-profile
- /managing-contribution-settings-on-your-profile
ms.openlocfilehash: 3901682d8723e2bdbe2351b7e1f39ccb34971cac
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '146199925'
---

View File

@@ -0,0 +1,30 @@
---
title: Управление параметрами вклада в профиле
intro: 'Ваши вклады, включая фиксации, предлагаемые запросы на вытягивание и открытые проблемы, отображаются в вашем профиле, чтобы люди видели вашу работу.'
redirect_from:
- /articles/managing-contribution-graphs-on-your-profile
- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
children:
- /viewing-contributions-on-your-profile
- /showing-an-overview-of-your-activity-on-your-profile
- /showing-your-private-contributions-and-achievements-on-your-profile
- /sending-enterprise-contributions-to-your-githubcom-profile
- /why-are-my-contributions-not-showing-up-on-my-profile
- /troubleshooting-commits-on-your-timeline
shortTitle: Manage contribution settings
ms.openlocfilehash: 022a9afdb91a5c65cea12c4bbeef5c4ba9673be6
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '147881214'
---

View File

@@ -0,0 +1,64 @@
---
title: Отправка корпоративных вкладов в ваш профиль GitHub.com
intro: 'Можно выделить свою работу в {% data variables.product.prodname_enterprise %}, отправив подсчеты вклада в профиль {% data variables.product.prodname_dotcom_the_website %}.'
redirect_from:
- /articles/sending-your-github-enterprise-contributions-to-your-github-com-profile
- /articles/sending-your-github-enterprise-server-contributions-to-your-github-com-profile
- /articles/sending-your-github-enterprise-server-contributions-to-your-githubcom-profile
- /github/setting-up-and-managing-your-github-profile/sending-your-github-enterprise-server-contributions-to-your-githubcom-profile
- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-your-github-enterprise-server-contributions-to-your-githubcom-profile
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Send enterprise contributions
ms.openlocfilehash: 6fb1803f3a93dd03af24ce9ea3f360e579d7dbd1
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '147080442'
---
## Сведения о корпоративных вкладах в вашем профиле {% data variables.product.prodname_dotcom_the_website %}
В вашем профиле {% data variables.product.prodname_dotcom_the_website %} отображается количество вкладов {% ifversion fpt or ghec %}{% data variables.product.prodname_enterprise %}{% else %}{% data variables.product.product_name %}{% endif %} за последние 90 дней. {% data reusables.github-connect.sync-frequency %} Количество вкладов из {% ifversion fpt or ghec %}{% data variables.product.prodname_enterprise %}{% else %}{% data variables.product.product_name %}{% endif %} считается частными вкладами. В сведениях о фиксации будет отображаться только количество вкладов и информация, что эти вклады были сделаны в среде {% data variables.product.prodname_enterprise %} за пределами {% data variables.product.prodname_dotcom_the_website %}.
Можно решить, следует ли отображать количество частных вкладов в вашем профиле. Дополнительные сведения см. в разделе [Публикация или скрытие личных вкладов в своем профиле](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile/).
Дополнительные сведения о том, как рассчитываются вклады, см. в разделе [Управление графами вкладов в вашем профиле](/articles/managing-contribution-graphs-on-your-profile/).
{% note %}
**Примечания.**
- Подключение между вашими учетными записями регулируется [Заявлением о конфиденциальности GitHub](/free-pro-team@latest/github/site-policy/github-privacy-statement/), и пользователи, разрешающие подключение, соглашаются с [Условиями предоставления услуг GitHub](/free-pro-team@latest/github/site-policy/github-terms-of-service).
- Прежде чем вы сможете подключить свой профиль {% ifversion fpt or ghec %}{% data variables.product.prodname_enterprise %}{% else %}{% data variables.product.product_name %}{% endif %} к профилю {% data variables.product.prodname_dotcom_the_website %}, владелец предприятия должен включить {% data variables.product.prodname_github_connect %} и включить общий доступ к вкладу для сред. Для получения дополнительной информации обратитесь к владельцу своего предприятия.
{% endnote %}
## Отправка ваших корпоративных вкладов в ваш профиль {% data variables.product.prodname_dotcom_the_website %}
{% ifversion fpt or ghec %}
- Сведения о том, как отправить корпоративные вклады из {% data variables.product.prodname_ghe_server %} в ваш профиль {% data variables.product.prodname_dotcom_the_website %}, см. в разделе [Отправка корпоративных вкладов в ваш профиль {% data variables.product.prodname_dotcom_the_website %}](/enterprise-server/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile) в документации {% data variables.product.prodname_ghe_server %}.
- Сведения о том, как отправить корпоративные вклады из {% data variables.product.prodname_ghe_managed %} в ваш профиль {% data variables.product.prodname_dotcom_the_website %}, см. в разделе [Отправка корпоративных вкладов в ваш профиль {% data variables.product.prodname_dotcom_the_website %}](/github-ae@latest/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile) в документации {% data variables.product.prodname_ghe_managed %}.
{% elsif ghes %}
1. Войдите в {% data variables.product.prodname_ghe_server %} и {% data variables.product.prodname_dotcom_the_website %}.
1. На {% data variables.product.prodname_ghe_server %} щелкните фото своего профиля в правом верхнем углу любой страницы и выберите **Параметры**.
![Значок параметров на панели пользователя](/assets/images/help/settings/userbar-account-settings.png) {% data reusables.github-connect.github-connect-tab-user-settings %} {% data reusables.github-connect.connect-dotcom-and-enterprise %}
1. Проверьте ресурсы, к которым {% data variables.product.prodname_ghe_server %} будет осуществляться доступ из вашей учетной записи {% data variables.product.prodname_dotcom_the_website %}, а затем щелкните **Авторизовать**.
![Авторизация подключения между GitHub Enterprise и GitHub.com](/assets/images/help/settings/authorize-ghe-to-connect-to-dotcom.png) {% data reusables.github-connect.send-contribution-counts-to-githubcom %}
{% elsif ghae %}
1. Войдите в {% data variables.product.prodname_ghe_managed %} и {% data variables.product.prodname_dotcom_the_website %}.
1. На {% data variables.product.prodname_ghe_managed %} щелкните фото своего профиля в правом верхнем углу любой страницы и нажмите **Параметры**.
![Значок параметров на панели пользователя](/assets/images/help/settings/userbar-account-settings.png) {% data reusables.github-connect.github-connect-tab-user-settings %} {% data reusables.github-connect.connect-dotcom-and-enterprise %} {% data reusables.github-connect.authorize-connection %} {% data reusables.github-connect.send-contribution-counts-to-githubcom %}
{% endif %}

View File

@@ -0,0 +1,30 @@
---
title: Обзор действий в профиле
intro: 'Можно включить раздел обзора действий в профиле, чтобы предоставить зрителям дополнительный контекст о типах внесенных вкладов.'
redirect_from:
- /articles/showing-an-overview-of-your-activity-on-your-profile
- /github/setting-up-and-managing-your-github-profile/showing-an-overview-of-your-activity-on-your-profile
- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/showing-an-overview-of-your-activity-on-your-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Show an overview
ms.openlocfilehash: a706c476cad8a2474ff1971dc8d81e680cf5c5c3
ms.sourcegitcommit: 6edb015070d3f0fda4525c6c931f1324626345dc
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/12/2022
ms.locfileid: '147888801'
---
{% data reusables.profile.activity-overview-summary %} Дополнительные сведения см. в разделе [Просмотр вкладов в профиле](/articles/viewing-contributions-on-your-profile).
![Раздел "Обзор действий" в профиле](/assets/images/help/profile/activity-overview-section.png)
{% data reusables.profile.access_profile %}
2. Над графом вкладов в раскрывающемся меню **Параметры вклада** выберите пункт **Обзор действий** или отмените его выбор.
![Включение обзора действий в раскрывающемся меню параметров вклада](/assets/images/help/profile/activity-overview.png)

View File

@@ -0,0 +1,55 @@
---
title: Showing your private contributions and achievements on your profile
intro: 'Your {% data variables.product.product_name %} profile shows a graph of your repository contributions over the past year. You can choose to show anonymized activity from {% ifversion fpt or ghes or ghec %}private and internal{% else %}private{% endif %} repositories{% ifversion fpt or ghes or ghec %} in addition to the activity from public repositories{% endif %}.'
redirect_from:
- /articles/publicizing-or-hiding-your-private-contributions-on-your-profile
- /github/setting-up-and-managing-your-github-profile/publicizing-or-hiding-your-private-contributions-on-your-profile
- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/publicizing-or-hiding-your-private-contributions-on-your-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Private contributions and achievements
---
If you publicize your private contributions, people without access to the private repositories you work in won't be able to see the details of your private contributions. Instead, they'll see the number of private contributions you made on any given day. Your public contributions will include detailed information. For more information, see "[Viewing contributions on your profile page](/articles/viewing-contributions-on-your-profile-page)."
{% note %}
**Note:** {% ifversion fpt or ghes or ghec %}On {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %}, public contributions on your profile are visible {% ifversion fpt or ghec %}to anyone in the world who can access {% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}only to other users of {% data variables.location.product_location%}{% endif %}.{% elsif ghae %}On {% data variables.product.prodname_ghe_managed %}, only other members of your enterprise can see the contributions on your profile.{% endif %}
{% endnote %}
## Changing the visibility of your private contributions
{% data reusables.profile.access_profile %}
1. Publicize or hide your private contributions on your profile:
- To publicize your private contributions, above your contributions graph, use the **Contribution settings** drop-down menu, and select **Private contributions**. Visitors will see your private contribution counts without further details.
![Enable visitors to see private contributions from contribution settings drop-down menu](/assets/images/help/profile/private-contributions-on.png)
- To hide your private contributions, above your contributions graph, use the **Contribution settings** drop-down menu, and unselect **Private contributions.** Visitors will only see your public contributions.
![Enable visitors to see private contributions from contribution settings drop-down menu](/assets/images/help/profile/private-contributions-off.png)
## Changing the visibility of Achievements
{% data reusables.user-settings.access_settings %}
1. Show or hide Achievements on your profile:
- To show Achievements on your profile, navigate to **Profile settings**, and select the checkbox next to **Show Achievements on my profile.**
![Enable visitors to see Achievements from profile settings](/assets/images/help/profile/achievements-profile-settings-off.png)
- To hide Achievements from your profile, navigate to **Profile settings**, and unselect the checkbox next to **Show Achievements on my profile.**
![Hide Achievements from visitors in profile settings](/assets/images/help/profile/achievements-profile-settings-on.png)
{% ifversion hide-individual-achievements %}
1. Optionally, to hide individual Achievements from your profile:
{% data reusables.profile.access_profile %}
1. Navigate to the Achievements section on the left sidebar of your profile and select the Achievements header. ![Achievements on profile sidebar](/assets/images/help/profile/achievements-on-profile.png)
2. Open the detail view of the achievement you'd like to hide by clicking on the achievement.
3. Once in the detail view, click the {% octicon "eye" aria-label="The eye icon" %} icon to hide the achievement. ![Achievement detail view](/assets/images/help/profile/achievements-detail-view.png) When hidden, badges will be marked by the {% octicon "eye-closed" aria-label="The eye closed icon" %} icon and are only visible to you. ![Hidden achievements](/assets/images/help/profile/achievements-hidden.png)
{% endif %}
## Further reading
- "[Viewing contributions on your profile page](/articles/viewing-contributions-on-your-profile-page)"
- "[Why are my contributions not showing up on my profile?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)"

View File

@@ -0,0 +1,75 @@
---
title: Устранение неполадок с фиксациями на временной шкале
intro: 'Вы можете просмотреть сведения о фиксациях на временной шкале профиля. Если вы не видите фиксации, ожидаемые в профиле, или не можете найти сведения о фиксации на странице профиля, дата фиксации и дата автора фиксации могут отличаться.'
redirect_from:
- /articles/troubleshooting-commits-on-your-timeline
- /github/setting-up-and-managing-your-github-profile/troubleshooting-commits-on-your-timeline
- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/troubleshooting-commits-on-your-timeline
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Troubleshoot commits
ms.openlocfilehash: 9052a1bde12dcc2530420a8f72123f3678da4cae
ms.sourcegitcommit: 5f40f9341dd1e953f4be8d1642f219e628e00cc8
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/04/2022
ms.locfileid: '148009111'
---
## Ожидаемое поведение для просмотра сведений о фиксации
На временной шкале страницы своего профиля щелкните количество фиксаций рядом с конкретным репозиторием, чтобы просмотреть более подробные сведения о своих фиксациях за этот период времени, включая различия конкретных изменений, внесенных в репозиторий.
![Ссылка на фиксацию на временной шкале профиля](/assets/images/help/profile/commit-link-on-profile-timeline.png)
![Сведения о фиксации](/assets/images/help/commits/commit-details.png)
## Отсутствие сведений о фиксации из фиксации на вашей временной шкале
Если вы щелкнете ссылку на фиксацию на странице своего профиля и не увидите все ожидаемые фиксации на странице фиксаций репозитория, возможно, история фиксаций в Git была переписана, а дата создания фиксации и дата фиксации отличаются.
![Страница репозитория с сообщением "фиксации для octocat не найдены"](/assets/images/help/repository/no-commits-found.png)
## Как GitHub использует дату создания и дату фиксации Git
В Git дата создания — это дата выполнения первой фиксации с `git commit`. Дата фиксации совпадает с датой создания, если никто не изменит дату фиксации с помощью `git commit --amend`, принудительной отправки, перемещения изменения из одной ветви в другую или других команд Git.
На странице вашего профиля дата создания используется для вычисления момента создания фиксации. Тогда как для вычисления момента выполнения фиксации в репозитории используется дата фиксации.
Чаще всего дата создания и дата фиксации совпадают, но вы можете заметить, что последовательность фиксаций нарушается, если история фиксаций изменилась. Дополнительные сведения см. в разделе [Почему мои вклады не отображаются в моем профиле?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)
## Просмотр отсутствующих сведений о фиксациях из фиксаций на временной шкале
Вы можете использовать команду `git show` с флагом `--pretty=fuller`, чтобы проверить, отличаются ли дата создания фиксации и дата фиксации.
```shell
$ git show YOUR_COMMIT_SHA_NUMBER --pretty=fuller
commit YOUR_COMMIT_SHA_NUMBER
Author: octocat USER_EMAIL
AuthorDate: Tue Apr 03 02:02:30 2018 +0900
Commit: Sally Johnson USER_EMAIL
CommitDate: Tue Apr 10 06:25:08 2018 +0900
```
Если дата создания и дата фиксации отличаются, вы можете вручную изменить дату фиксации в URL-адресе, чтобы просмотреть сведения о фиксации.
Пример:
- В этом URL-адресе используется дата создания `2018-04-03`:
`https://github.com/your-organization-or-personal-account/your-repository/commits?author=octocat&since=2018-04-03T00:00:00Z&until=2018-04-03T23:59:59Z`
- В этом URL-адресе используется дата фиксации `2018-04-10`:
`https://github.com/your-organization-or-personal-account/your-repository/commits?author=octocat&since=2018-04-10T00:00:00Z&until=2018-04-10T23:59:59Z`
Открыв URL-адрес с измененной датой фиксации, вы можете просмотреть сведения о фиксации.
![Сведения о фиксации](/assets/images/help/commits/commit-details.png)
## Отсутствие ожидаемых фиксаций на временной шкале
Если вы не видите ожидаемые фиксации на временной шкале, возможно, история фиксаций в Git была переписана, а дата создания фиксации и дата фиксации отличаются. Сведения о других возможностях см. в статье [Почему мои вклады не отображаются в моем профиле?](/articles/why-are-my-contributions-not-showing-up-on-my-profile)

View File

@@ -0,0 +1,97 @@
---
title: Viewing contributions on your profile
intro: 'Your {% data variables.product.product_name %} profile shows off {% ifversion fpt or ghes or ghec %}your pinned repositories, Achievements, and{% endif %} a graph of your repository contributions over the past year.'
redirect_from:
- /articles/viewing-contributions
- /articles/viewing-contributions-on-your-profile-page
- /articles/viewing-contributions-on-your-profile
- /github/setting-up-and-managing-your-github-profile/viewing-contributions-on-your-profile
- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: View contributions
---
{% ifversion fpt or ghes or ghec %}Your contribution graph and Achievements show activity from public repositories. {% endif %}You can choose to show activity from {% ifversion fpt or ghes or ghec %}both public and {% endif %}private repositories, with specific details of your activity in private repositories anonymized. For more information, see "[Publicizing or hiding your private contributions on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)."
{% note %}
**Note:** Commits will only appear on your contributions graph if the email address you used to author the commits is connected to your account on {% data variables.product.product_name %}. For more information, see "[Why are my contributions not showing up on my profile?](/articles/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)"
{% endnote %}
## What counts as a contribution
On your profile page, certain actions count as contributions:
- Committing to a repository's default branch or `gh-pages` branch
- Opening an issue
- Opening a discussion
- Answering a discussion
- Proposing a pull request
- Submitting a pull request review{% ifversion ghes or ghae %}
- Co-authoring commits in a repository's default branch or `gh-pages` branch{% endif %}
{% data reusables.pull_requests.pull_request_merges_and_contributions %}
## Popular repositories
This section displays your repositories with the most watchers. {% ifversion fpt or ghes or ghec %}Once you [pin repositories to your profile](/articles/pinning-repositories-to-your-profile), this section will change to "Pinned repositories."{% endif %}
![Popular repositories](/assets/images/help/profile/profile_popular_repositories.png)
{% ifversion fpt or ghes or ghec %}
## Pinned repositories
This section displays up to six public repositories and can include your repositories as well as repositories you've contributed to. To easily see important details about the repositories you've chosen to feature, each repository in this section includes a summary of the work being done, the number of [stars](/articles/saving-repositories-with-stars/) the repository has received, and the main programming language used in the repository. For more information, see "[Pinning repositories to your profile](/articles/pinning-repositories-to-your-profile)."
![Pinned repositories](/assets/images/help/profile/profile_pinned_repositories.png)
{% endif %}
## Contributions calendar
Your contributions calendar shows your contribution activity.
### Viewing contributions from specific times
- Click on a day's square to show the contributions made during that 24-hour period.
- Press *Shift* and click on another day's square to show contributions made during that time span.
{% note %}
**Note:** You can select up to a one-month range on your contributions calendar. If you select a larger time span, we will only display one month of contributions.
{% endnote %}
![Your contributions graph](/assets/images/help/profile/contributions_graph.png)
### How contribution event times are calculated
Timestamps are calculated differently for commits and pull requests:
- **Commits** use the time zone information in the commit timestamp. For more information, see "[Troubleshooting commits on your timeline](/articles/troubleshooting-commits-on-your-timeline)."
- **Pull requests** and **issues** opened on {% data variables.product.product_name %} use your browser's time zone. Those opened via the API use the timestamp or time zone [specified in the API call](https://developer.github.com/changes/2014-03-04-timezone-handling-changes).
## Activity overview
{% data reusables.profile.activity-overview-summary %} For more information, see "[Showing an overview of your activity on your profile](/articles/showing-an-overview-of-your-activity-on-your-profile)."
![Activity overview section on profile](/assets/images/help/profile/activity-overview-section.png)
The organizations featured in the activity overview are prioritized according to how active you are in the organization. If you @mention an organization in your profile bio, and youre an organization member, then that organization is prioritized first in the activity overview. For more information, see "[Mentioning people and teams](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)" or "[Adding a bio to your profile](/articles/adding-a-bio-to-your-profile/)."
## Contribution activity
The contribution activity section includes a detailed timeline of your work, including commits you've made or co-authored, pull requests you've proposed, and issues you've opened. You can see your contributions over time by either clicking **Show more activity** at the bottom of your contribution activity or by clicking the year you're interested in viewing on the right side of the page. Important moments, like the date you joined an organization, proposed your first pull request, or opened a high-profile issue, are highlighted in your contribution activity. If you can't see certain events in your timeline, check to make sure you still have access to the organization or repository where the event happened.
![Contribution activity time filter](/assets/images/help/profile/contributions_activity_time_filter.png)
## Viewing contributions from {% data variables.product.prodname_enterprise %} on {% data variables.product.prodname_dotcom_the_website %}
If you use {% ifversion fpt or ghec %}{% data variables.product.prodname_ghe_server %}{% ifversion ghae %} or {% data variables.product.prodname_ghe_managed %}{% endif %}{% else %}{% data variables.product.product_name %}{% endif %} and your enterprise owner enables {% data variables.enterprise.prodname_unified_contributions %}, you can send enterprise contribution counts from to your {% data variables.product.prodname_dotcom_the_website %} profile. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)."

View File

@@ -0,0 +1,105 @@
---
title: Why are my contributions not showing up on my profile?
intro: Learn common reasons that contributions may be missing from your contributions graph.
redirect_from:
- /articles/why-are-my-contributions-not-showing-up-on-my-profile
- /github/setting-up-and-managing-your-github-profile/why-are-my-contributions-not-showing-up-on-my-profile
- /github/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Profiles
shortTitle: Missing contributions
---
## About your contribution graph
Your profile contributions graph is a record of contributions you've made to repositories {% ifversion ghae %}owned by{% else %}on{% endif %} {% data variables.location.product_location %}. Contributions are timestamped according to Coordinated Universal Time (UTC) rather than your local time zone. Contributions are only counted if they meet certain criteria. In some cases, we may need to rebuild your graph in order for contributions to appear.
If you are part of an organization that uses SAML single sign-on (SSO), you wont be able to see contribution activity from the organization on your profile if you do not have an active SSO session. People viewing your profile from outside your organization will see anonymized contribution activity of your contribution activity for your organization.
## Contributions that are counted
### Issues, pull requests and discussions
Issues, pull requests, and discussions will appear on your contribution graph if they were opened in a standalone repository, not a fork.
### Commits
Commits will appear on your contributions graph if they meet **all** of the following conditions:
- The email address used for the commits is associated with your account on {% data variables.location.product_location %}.
- The commits were made in a standalone repository, not a fork.
- The commits were made:
- In the repository's default branch
- In the `gh-pages` branch (for repositories with project sites)
For more information on project sites, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)."
In addition, **at least one** of the following must be true:
- You are a collaborator on the repository or are a member of the organization that owns the repository.
- You have forked the repository.
- You have opened a pull request or issue in the repository.
- You have starred the repository.
## Common reasons that contributions are not counted
{% data reusables.pull_requests.pull_request_merges_and_contributions %}
### Commit was made less than 24 hours ago
After making a commit that meets the requirements to count as a contribution, you may need to wait for up to 24 hours to see the contribution appear on your contributions graph.
### Your local Git commit email isn't connected to your account
Commits must be made with an email address that is connected to your account on {% data variables.location.product_location %}{% ifversion fpt or ghec %}, or the {% data variables.product.prodname_dotcom %}-provided `noreply` email address provided to you in your email settings,{% endif %} in order to appear on your contributions graph.{% ifversion fpt or ghec %} For more information about `noreply` email addresses, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#about-commit-email-addresses)."{% endif %}
You can check the email address used for a commit by adding `.patch` to the end of a commit URL, e.g. <a href="https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch" data-proofer-ignore>https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch</a>:
```
From 67c0afc1da354d8571f51b6f0af8f2794117fd10 Mon Sep 17 00:00:00 2001
From: The Octocat <octocat@nowhere.com>
Date: Sun, 27 Apr 2014 15:36:39 +0530
Subject: [PATCH] updated index for better welcome message
```
The email address in the `From:` field is the address that was set in the [local git config settings](/articles/set-up-git). In this example, the email address used for the commit is `octocat@nowhere.com`.
If the email address used for the commit is not connected to your account on {% data variables.location.product_location %}, {% ifversion ghae %}change the email address used to author commits in Git. For more information, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)."{% else %}you must [add the email address](/articles/adding-an-email-address-to-your-github-account) to your account on {% data variables.location.product_location %}. Your contributions graph will be rebuilt automatically when you add the new address.{% endif %}
{% ifversion fpt or ghec %}
{% note %}
**Note**: If you use a {% data variables.enterprise.prodname_managed_user %}, you cannot add additional email addresses to the account, even if multiple email addresses are registered with your identity provider (IdP). Therefore, only commits that are authored by the primary email address registered with your IdP can be associated with your {% data variables.enterprise.prodname_managed_user %}.
{% endnote %}
{% endif %}
Generic email addresses, such as `jane@computer.local`, cannot be added to {% data variables.product.prodname_dotcom %} accounts and linked to commits. If you've authored any commits using a generic email address, the commits will not be linked to your {% data variables.product.prodname_dotcom %} profile and will not show up in your contribution graph.
### Commit was not made in the default or `gh-pages` branch
Commits are only counted if they are made in the default branch or the `gh-pages` branch (for repositories with project sites). For more information, see "[About {% data variables.product.prodname_pages %}](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)."
If your commits are in a non-default or non-`gh-pages` branch and you'd like them to count toward your contributions, you will need to do one of the following:
- [Open a pull request](/articles/creating-a-pull-request) to have your changes merged into the default branch or the `gh-pages` branch.
- [Change the default branch](/github/administering-a-repository/changing-the-default-branch) of the repository.
{% warning %}
**Warning**: Changing the default branch of the repository will change it for all repository collaborators. Only do this if you want the new branch to become the base against which all future pull requests and commits will be made.
{% endwarning %}
### Commit was made in a fork
Commits made in a fork will not count toward your contributions. To make them count, you must do one of the following:
- [Open a pull request](/articles/creating-a-pull-request) to have your changes merged into the parent repository.
- To detach the fork and turn it into a standalone repository on {% data variables.location.product_location %}, contact {% data variables.contact.contact_support %}. If the fork has forks of its own, let {% data variables.contact.contact_support %} know if the forks should move with your repository into a new network or remain in the current network. For more information, see "[About forks](/articles/about-forks/)."
## Further reading
- "[Publicizing or hiding your private contributions on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)"
- "[Viewing contributions on your profile page](/articles/viewing-contributions-on-your-profile-page)"

View File

@@ -0,0 +1,29 @@
---
title: Настройка личной учетной записи GitHub и управление ею
intro: 'Вы можете управлять параметрами личной учетной записи в {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}, включая настройки электронной почты, доступ к личным репозиториям и членство в организации. Вы также можете управлять самой учетной записью.'
shortTitle: Personal accounts
redirect_from:
- /categories/setting-up-and-managing-your-github-user-account
- /github/setting-up-and-managing-your-github-user-account
- /account-and-profile/setting-up-and-managing-your-github-user-account
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
children:
- /managing-personal-account-settings
- /managing-your-personal-account
- /managing-email-preferences
- /managing-access-to-your-personal-repositories
- /managing-your-membership-in-organizations
ms.openlocfilehash: b3c8007f37b9c61650f96a51e805024dd10a853f
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/25/2022
ms.locfileid: '148106688'
---

View File

@@ -0,0 +1,32 @@
---
title: Управление доступом к личным репозиториям
intro: 'Вы можете предоставить людям доступ к репозиториям, принадлежащим личной учетной записи, в качестве участников совместной работы.'
redirect_from:
- /categories/101/articles
- /categories/managing-repository-collaborators
- /articles/managing-access-to-your-personal-repositories
- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories
product: '{% data reusables.gated-features.user-repo-collaborators %}'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Repositories
children:
- /inviting-collaborators-to-a-personal-repository
- /removing-a-collaborator-from-a-personal-repository
- /removing-yourself-from-a-collaborators-repository
- /maintaining-ownership-continuity-of-your-personal-accounts-repositories
shortTitle: Access to your repositories
ms.openlocfilehash: 98b504beea02ce0dfb73ebe2db34fea498c75776
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145165210'
---

View File

@@ -0,0 +1,67 @@
---
title: Inviting collaborators to a personal repository
intro: 'You can {% ifversion fpt or ghec %}invite users to become{% else %}add users as{% endif %} collaborators to your personal repository.'
redirect_from:
- /articles/how-do-i-add-a-collaborator
- /articles/adding-collaborators-to-a-personal-repository
- /articles/inviting-collaborators-to-a-personal-repository
- /github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository
- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository
product: '{% data reusables.gated-features.user-repo-collaborators %}'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Repositories
shortTitle: Invite collaborators
---
Repositories owned by an organization can grant more granular access. For more information, see "[Access permissions on {% data variables.product.prodname_dotcom %}](/articles/access-permissions-on-github)."
{% data reusables.organizations.org-invite-expiration %}
{% ifversion fpt or ghec %}
If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you can only invite other members of your enterprise to collaborate with you. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% note %}
**Note:** {% data variables.product.company_short %} limits the number of people who can be invited to a repository within a 24-hour period. If you exceed this limit, either wait 24 hours or create an organization to collaborate with more people.
{% endnote %}
{% endif %}
1. Ask for the username of the person you're inviting as a collaborator.{% ifversion fpt or ghec %} If they don't have a username yet, they can sign up for {% data variables.product.prodname_dotcom %} For more information, see "[Signing up for a new {% data variables.product.prodname_dotcom %} account](/articles/signing-up-for-a-new-github-account)".{% endif %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4%}
{% data reusables.repositories.click-collaborators-teams %}
1. Click **Invite a collaborator**.
!["Invite a collaborator" button](/assets/images/help/repository/invite-a-collaborator-button.png)
2. In the search field, start typing the name of person you want to invite, then click a name in the list of matches.
![Search field for typing the name of a person to invite to the repository](/assets/images/help/repository/manage-access-invite-search-field-user.png)
3. Click **Add NAME to REPOSITORY**.
![Button to add collaborator](/assets/images/help/repository/add-collaborator-user-repo.png)
{% else %}
5. In the left sidebar, click **Collaborators**.
![Repository settings sidebar with Collaborators highlighted](/assets/images/help/repository/user-account-repo-settings-collaborators.png)
6. Under "Collaborators", start typing the collaborator's username.
7. Select the collaborator's username from the drop-down menu.
![Collaborator list drop-down menu](/assets/images/help/repository/repo-settings-collab-autofill.png)
8. Click **Add collaborator**.
!["Add collaborator" button](/assets/images/help/repository/repo-settings-collab-add.png)
{% endif %}
{% ifversion fpt or ghec %}
9. The user will receive an email inviting them to the repository. Once they accept your invitation, they will have collaborator access to your repository.
{% endif %}
## Further reading
- "[Permission levels for a personal account repository](/articles/permission-levels-for-a-user-account-repository/#collaborator-access-for-a-repository-owned-by-a-personal-account)"
- "[Removing a collaborator from a personal repository](/articles/removing-a-collaborator-from-a-personal-repository)"
- "[Removing yourself from a collaborator's repository](/articles/removing-yourself-from-a-collaborator-s-repository)"
- "[Organizing members into teams](/organizations/organizing-members-into-teams)"

View File

@@ -0,0 +1,40 @@
---
title: Maintaining ownership continuity of your personal account's repositories
intro: You can invite someone to manage your user owned repositories if you are not able to.
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
- Repositories
redirect_from:
- /github/setting-up-and-managing-your-github-user-account/maintaining-ownership-continuity-of-your-user-accounts-repositories
- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/maintaining-ownership-continuity-of-your-user-accounts-repositories
shortTitle: Ownership continuity
---
## About successors
We recommend inviting another {% data variables.product.company_short %} user to be your successor, to manage your user owned repositories if you cannot. As a successor, they will have permission to:
- Archive your public repositories.
- Transfer your public repositories to their own user owned account.
- Transfer your public repositories to an organization where they can create repositories.
Successors cannot log into your account.
An appointed successor can manage your public repositories after presenting a death certificate then waiting for 7 days or presenting an obituary then waiting for 21 days. For more information, see "[{% data variables.product.company_short %} Deceased User Policy](/free-pro-team@latest/github/site-policy/github-deceased-user-policy)."
To request access to manage repositories as a successor, contact [GitHub Support](https://support.github.com/contact?tags=docs-accounts).
## Inviting a successor
The person you invite to be your successor must have a {% data variables.product.company_short %} account.
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.account_settings %}
3. Under "Successor settings", to invite a successor, begin typing a username, full name, or email address, then click their name when it appears.
![Successor invitation search field](/assets/images/help/settings/settings-invite-successor-search-field.png)
4. Click **Add successor**.
{% data reusables.user-settings.sudo-mode-popup %}
6. The user you've invited will be listed as "Pending" until they agree to become your successor.
![Pending successor invitation](/assets/images/help/settings/settings-pending-successor.png)

View File

@@ -0,0 +1,47 @@
---
title: Removing a collaborator from a personal repository
intro: 'When you remove a collaborator from your project, they lose read/write access to your repository. If the repository is private and the person has created a fork, then that fork is also deleted.'
redirect_from:
- /articles/how-do-i-remove-a-collaborator
- /articles/what-happens-when-i-remove-a-collaborator-from-my-private-repository
- /articles/removing-a-collaborator-from-a-private-repository
- /articles/deleting-a-private-fork-of-a-private-user-repository
- /articles/how-do-i-delete-a-fork-of-my-private-repository
- /articles/removing-a-collaborator-from-a-personal-repository
- /github/setting-up-and-managing-your-github-user-account/removing-a-collaborator-from-a-personal-repository
- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository
product: '{% data reusables.gated-features.user-repo-collaborators %}'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Repositories
shortTitle: Remove a collaborator
---
## Deleting forks of private repositories
While forks of private repositories are deleted when a collaborator is removed, the person will still retain any local clones of your repository.
## Removing collaborator permissions from a person contributing to a repository
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}
{% data reusables.repositories.click-collaborators-teams %}
4. To the right of the collaborator you want to remove, click {% octicon "trash" aria-label="The trash icon" %}.
![Button to remove collaborator](/assets/images/help/repository/collaborator-remove.png)
{% else %}
3. In the left sidebar, click **Collaborators & teams**.
![Collaborators tab](/assets/images/help/repository/repo-settings-collaborators.png)
4. Next to the collaborator you want to remove, click the **X** icon.
![Remove link](/assets/images/help/organizations/Collaborator-Remove.png)
{% endif %}
## Further reading
- "[Removing organization members from a team](/articles/removing-organization-members-from-a-team)"
- "[Removing an outside collaborator from an organization repository](/articles/removing-an-outside-collaborator-from-an-organization-repository)"

View File

@@ -0,0 +1,33 @@
---
title: Removing yourself from a collaborator's repository
intro: 'If you no longer want to be a collaborator on someone else''s repository, you can remove yourself.'
redirect_from:
- /leave-a-collaborative-repo
- /leave-a-repo
- /articles/removing-yourself-from-a-collaborator-s-repo
- /articles/removing-yourself-from-a-collaborator-s-repository
- /articles/removing-yourself-from-a-collaborators-repository
- /github/setting-up-and-managing-your-github-user-account/removing-yourself-from-a-collaborators-repository
- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Repositories
shortTitle: Remove yourself
---
{% data reusables.user-settings.access_settings %}
{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}
2. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "repo" aria-label="The repo icon" %} Repositories**.
{% else %}
2. In the left sidebar, click **Repositories**.
![Repositories tab](/assets/images/help/settings/settings-sidebar-repositories.png)
{% endif %}
3. Next to the repository you want to leave, click **Leave**.
![Leave button](/assets/images/help/repository/repo-leave.png)
4. Read the warning carefully, then click "I understand, leave this repository."
![Dialog box warning you to leave](/assets/images/help/repository/repo-leave-confirmation.png)

View File

@@ -0,0 +1,37 @@
---
title: Adding an email address to your GitHub account
intro: '{% data variables.product.product_name %} allows you to add as many email addresses to your account as you like. If you set an email address in your local Git configuration, you will need to add it to your account settings in order to connect your commits to your account. For more information about your email address and commits, see "[Setting your commit email address](/articles/setting-your-commit-email-address/)."'
redirect_from:
- /articles/adding-an-email-address-to-your-github-account
- /github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/adding-an-email-address-to-your-github-account
versions:
fpt: '*'
ghes: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Add an email address
---
{% ifversion fpt or ghec %}
{% note %}
**Notes**:
- {% data reusables.user-settings.no-verification-disposable-emails %}
- If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you cannot make changes to your email address on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% endnote %}
{% endif %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
{% data reusables.user-settings.add_and_verify_email %}
{% data reusables.user-settings.select_primary_email %}
## Further reading
- "[Managing email preferences](/articles/managing-email-preferences/)"

View File

@@ -0,0 +1,29 @@
---
title: Blocking command line pushes that expose your personal email address
intro: 'If you''ve chosen to keep your email address private when performing web-based operations, you can also choose to block command line pushes that may expose your personal email address.'
redirect_from:
- /articles/blocking-command-line-pushes-that-expose-your-personal-email-address
- /github/setting-up-and-managing-your-github-user-account/blocking-command-line-pushes-that-expose-your-personal-email-address
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Block push with personal email
---
When you push commits from the command line, the email address that you've [set in Git](/articles/setting-your-commit-email-address) is associated with your commits. If you enable this setting, each time you push to GitHub, well check the most recent commit. If the author email on that commit is a private email on your GitHub account, we will block the push and warn you about exposing your private email.
{% data reusables.user-settings.about-commit-email-addresses %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
{% data reusables.user-settings.keeping_your_email_address_private %}
4. To keep your email address private in commits you push from the command line, select **Block command line pushes that expose my email**.
![Option to block command line pushes that expose your emails](/assets/images/help/settings/email_privacy_block_command_line_pushes.png)
## Further reading
- "[Setting your commit email address](/articles/setting-your-commit-email-address)"

View File

@@ -0,0 +1,33 @@
---
title: Changing your primary email address
intro: You can change the email address associated with your personal account at any time.
redirect_from:
- /articles/changing-your-primary-email-address
- /github/setting-up-and-managing-your-github-user-account/changing-your-primary-email-address
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/changing-your-primary-email-address
versions:
fpt: '*'
ghes: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Primary email address
---
{% note %}
**Note:** You cannot change your primary email address to an email that is already set to be your backup email address.
{% endnote %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
3. If you'd like to add a new email address to set as your primary email address, under "Add email address", type a new email address and click **Add**.
![Add another email address button](/assets/images/help/settings/add_another_email_address.png)
4. Under "Primary email address", use the drop-down menu to click the email address you'd like to set as your primary email address, and click **Save**.
![Set as primary button](/assets/images/help/settings/set_as_primary_email.png)
5. To remove the old email address from your account, next to the old email, click {% octicon "trash" aria-label="The trash symbol" %}.
{% ifversion fpt or ghec %}
6. Verify your new primary email address. Without a verified email address, you won't be able to use all of {% data variables.product.product_name %}'s features. For more information, see "[Verifying your email address](/articles/verifying-your-email-address)."
{% endif %}

View File

@@ -0,0 +1,28 @@
---
title: Managing email preferences
intro: 'You can add or change the email addresses associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. You can also manage emails you receive from {% data variables.product.product_name %}.'
redirect_from:
- /categories/managing-email-preferences
- /articles/managing-email-preferences
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Notifications
children:
- /adding-an-email-address-to-your-github-account
- /changing-your-primary-email-address
- /setting-a-backup-email-address
- /setting-your-commit-email-address
- /blocking-command-line-pushes-that-expose-your-personal-email-address
- /remembering-your-github-username-or-email
- /types-of-emails-github-sends
- /managing-marketing-emails-from-github
shortTitle: Manage email preferences
---

View File

@@ -0,0 +1,35 @@
---
title: Managing marketing emails from GitHub
intro: 'In addition to notifications and account emails, {% data variables.product.prodname_dotcom %} occasionally sends marketing emails with news and information about our products. If you unsubscribe from existing marketing emails, you won''t be included in future campaigns unless you change your {% data variables.product.prodname_dotcom %} email settings.'
redirect_from:
- /articles/managing-marketing-emails-from-github
- /github/setting-up-and-managing-your-github-user-account/managing-marketing-emails-from-github
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/managing-marketing-emails-from-github
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Marketing emails
---
## Unsubscribing from {% data variables.product.prodname_dotcom %} marketing emails
{% tip %}
**Tip:** If you unsubscribe from all marketing emails and then subscribe to the Explore newsletter, you'll only receive the Explore newsletter, and won't receive other marketing email.
{% endtip %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
3. Under *Email preferences*, select **Only receive account related emails, and those I subscribe to**.
![Screenshot of opting out of marketing email](/assets/images/help/notifications/email_preferences.png)
4. Click **Save email preferences**.
![Save email preferences button](/assets/images/help/notifications/save_email_preferences.png)
## Further reading
- "[Types of emails GitHub sends](/articles/types-of-emails-github-sends)"
- "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications)"

View File

@@ -0,0 +1,76 @@
---
title: Remembering your GitHub username or email
intro: 'Are you signing in to {% data variables.location.product_location %} for the first time in a while? If so, welcome back! If you can''t remember the username for your personal account on {% data variables.product.product_name %}, you can try these methods for remembering it.'
redirect_from:
- /articles/oh-noes-i-ve-forgotten-my-username-email
- /articles/oh-noes-i-ve-forgotten-my-username-or-email
- /articles/remembering-your-github-username-or-email
- /github/setting-up-and-managing-your-github-user-account/remembering-your-github-username-or-email
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/remembering-your-github-username-or-email
versions:
fpt: '*'
ghes: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Find your username or email
---
{% mac %}
## {% data variables.product.prodname_desktop %} users
1. In the **GitHub Desktop** menu, click **Preferences**.
2. In the Preferences window, verify the following:
- To view your {% data variables.product.product_name %} username, click **Accounts**.
- To view your Git email, click **Git**. Note that this email is not guaranteed to be [your primary {% data variables.product.product_name %} email](/articles/changing-your-primary-email-address).
{% endmac %}
{% windows %}
## {% data variables.product.prodname_desktop %} users
1. In the **File** menu, click **Options**.
2. In the Options window, verify the following:
- To view your {% data variables.product.product_name %} username, click **Accounts**.
- To view your Git email, click **Git**. Note that this email is not guaranteed to be [your primary {% data variables.product.product_name %} email](/articles/changing-your-primary-email-address).
{% endwindows %}
## Finding your username in your `user.name` configuration
During set up, you may have [set your username in Git](/github/getting-started-with-github/setting-your-username-in-git). If so, you can review the value of this configuration setting:
```shell
$ git config user.name
# View the setting
YOUR_USERNAME
```
## Finding your username in the URL of remote repositories
If you have any local copies of personal repositories you have created or forked, you can check the URL of the remote repository.
{% tip %}
**Tip**: This method only works if you have an original repository or your own fork of someone else's repository. If you clone someone else's repository, their username will show instead of yours. Similarly, organization repositories will show the name of the organization instead of a particular user in the remote URL.
{% endtip %}
```shell
$ cd YOUR_REPOSITORY
# Change directories to the initialized Git repository
$ git remote -v
origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (fetch)
origin https://{% data variables.command_line.codeblock %}/YOUR_USERNAME/YOUR_REPOSITORY.git (push)
```
Your user name is what immediately follows the `https://{% data variables.command_line.backticks %}/`.
{% ifversion fpt or ghec %}
## Further reading
- "[Verifying your email address](/articles/verifying-your-email-address)"
{% endif %}

View File

@@ -0,0 +1,28 @@
---
title: Setting a backup email address
intro: 'Use a backup email address as an additional destination for security-relevant account notifications{% ifversion not ghae %} and to securely reset your password if you can no longer access your primary email address{% endif %}.'
redirect_from:
- /articles/setting-a-backup-email-address
- /github/setting-up-and-managing-your-github-user-account/setting-a-backup-email-address
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-a-backup-email-address
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Set backup email address
---
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
3. Under "Backup email address," select the address you want to set as your backup email address using the drop-down menu.
![Backup email address](/assets/images/help/settings/backup-email-address.png)
4. Click **Save**.
## Further reading
- "[Managing email preferences](/articles/managing-email-preferences/)"
- "[Updating your GitHub access credentials](/articles/updating-your-github-access-credentials/)"

View File

@@ -0,0 +1,105 @@
---
title: Setting your commit email address
intro: 'You can set the email address that is used to author commits on {% data variables.location.product_location %} and on your computer.'
redirect_from:
- /articles/keeping-your-email-address-private
- /articles/setting-your-commit-email-address-on-github
- /articles/about-commit-email-addresses
- /articles/git-email-settings
- /articles/setting-your-email-in-git
- /articles/set-your-user-name-email-and-github-token
- /articles/setting-your-commit-email-address-in-git
- /articles/setting-your-commit-email-address
- /github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Set commit email address
---
## About commit email addresses
{% data variables.product.prodname_dotcom %} uses your commit email address to associate commits with your account on {% data variables.location.product_location %}. You can choose the email address that will be associated with the commits you push from the command line as well as web-based Git operations you make.
For web-based Git operations, you can set your commit email address on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. For commits you push from the command line, you can set your commit email address in Git.
{% ifversion fpt or ghec %}Any commits you made prior to changing your commit email address are still associated with your previous email address.{% else %}After changing your commit email address on {% data variables.product.product_name %}, the new email address will be visible in all of your future web-based Git operations by default. Any commits you made prior to changing your commit email address are still associated with your previous email address.{% endif %}
{% ifversion fpt or ghec %}
{% note %}
**Note**: {% data reusables.user-settings.no-verification-disposable-emails %}
{% endnote %}
{% endif %}
{% ifversion fpt or ghec %}If you'd like to keep your personal email address private, you can use a `noreply` email address from {% data variables.product.product_name %} as your commit email address. To use your `noreply` email address for commits you push from the command line, use that email address when you set your commit email address in Git. To use your `noreply` address for web-based Git operations, set your commit email address on GitHub and choose to **Keep my email address private**.
You can also choose to block commits you push from the command line that expose your personal email address. For more information, see "[Blocking command line pushes that expose your personal email](/articles/blocking-command-line-pushes-that-expose-your-personal-email-address)."{% endif %}
To ensure that commits are attributed to you and appear in your contributions graph, use an email address that is connected to your account on {% data variables.location.product_location %}{% ifversion fpt or ghec %}, or the `noreply` email address provided to you in your email settings{% endif %}. {% ifversion not ghae %}For more information, see "[Adding an email address to your {% data variables.product.prodname_dotcom %} account](/github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account)."{% endif %}
{% ifversion fpt or ghec %}
{% note %}
**Note:** If you created your account on {% data variables.location.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is an ID number and your username in the form of <code>ID+USERNAME@users.noreply.github.com</code>. If you created your account on {% data variables.location.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is <code>USERNAME@users.noreply.github.com</code>. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings.
{% endnote %}
If you use your `noreply` email address for {% data variables.product.product_name %} to make commits and then [change your username](/articles/changing-your-github-username), those commits will not be associated with your account on {% data variables.location.product_location %}. This does not apply if you're using the ID-based `noreply` address from {% data variables.product.product_name %}. For more information, see "[Changing your {% data variables.product.prodname_dotcom %} username](/articles/changing-your-github-username)."{% endif %}
## Setting your commit email address on {% data variables.product.prodname_dotcom %}
{% data reusables.files.commit-author-email-options %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
{% data reusables.user-settings.add_and_verify_email %}
{% data reusables.user-settings.select_primary_email %}{% ifversion fpt or ghec %}
{% data reusables.user-settings.keeping_your_email_address_private %}{% endif %}
## Setting your commit email address in Git
You can use the `git config` command to change the email address you associate with your Git commits. The new email address you set will be visible in any future commits you push to {% data variables.location.product_location %} from the command line. Any commits you made prior to changing your commit email address are still associated with your previous email address.
### Setting your email address for every repository on your computer
{% data reusables.command_line.open_the_multi_os_terminal %}
2. {% data reusables.user-settings.set_your_email_address_in_git %}
```shell
$ git config --global user.email "YOUR_EMAIL"
```
3. {% data reusables.user-settings.confirm_git_email_address_correct %}
```shell
$ git config --global user.email
<span class="output">email@example.com</span>
```
4. {% data reusables.user-settings.link_email_with_your_account %}
### Setting your email address for a single repository
{% data variables.product.product_name %} uses the email address set in your local Git configuration to associate commits pushed from the command line with your account on {% data variables.location.product_location %}.
You can change the email address associated with commits you make in a single repository. This will override your global Git configuration settings in this one repository, but will not affect any other repositories.
{% data reusables.command_line.open_the_multi_os_terminal %}
2. Change the current working directory to the local repository where you want to configure the email address that you associate with your Git commits.
3. {% data reusables.user-settings.set_your_email_address_in_git %}
```shell
$ git config user.email "YOUR_EMAIL"
```
4. {% data reusables.user-settings.confirm_git_email_address_correct %}
```shell
$ git config user.email
<span class="output">email@example.com</span>
```
5. {% data reusables.user-settings.link_email_with_your_account %}

View File

@@ -0,0 +1,60 @@
---
title: 'Типы электронных писем, отправляемых GitHub'
intro: 'Существует несколько типов сообщений электронной почты, которые можно получить из {% data variables.product.product_name %}, включая уведомления, данные учетной записи, приглашения к исследованию клиентов и маркетинговые информационные материалы.'
redirect_from:
- /articles/types-of-emails-github-sends
- /github/setting-up-and-managing-your-github-user-account/types-of-emails-github-sends
- /github/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/types-of-emails-github-sends
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
- Notifications
shortTitle: Emails from GitHub
ms.openlocfilehash: 0e03038c272f2815fd4427f73110641aa57b7028
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145165138'
---
## Электронные уведомления
Можно получать некоторые или все уведомления о действиях по электронной почте. Дополнительные сведения см. в разделе [Сведения об уведомлениях](/github/managing-subscriptions-and-notifications-on-github/about-notifications). Электронные уведомления могут включать:
- действия, связанные с безопасностью, в репозиториях, к которым у вас есть доступ как администратора
- действия в репозиториях, за которыми вы следите
- беседы, в которых вы участвуете
- беседы, в которых вы были @mentioned
- отправки запросов на вытягивание, в которых вы участвуете
- приглашения для сотрудничества в организации или репозитории
- собственные действия, например, открытие, комментирование или закрытие проблем и запросов на вытягивание.
Можно также выбрать, какой тип обновлений по электронной почте вы хотите получать относительно бесед, в которых участвуете или за которыми следите. Дополнительные сведения см. в разделе [Настройка уведомлений](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications).
## Сообщения электронной почты в учетной записи
Если вы выполнили обновление до платных продуктов или функций, то получите квитанции о выставлении счетов на основной адрес электронной почты учетной записи. Дополнительные сведения см. в разделе [Настройка электронной почты для выставления счетов](/articles/setting-your-billing-email).
## Электронные письма с опросами клиентов
{% data variables.product.product_name %} иногда ищет клиентов для участия в сеансах опросов, чтобы помочь сделать GitHub лучше. Они проводятся удаленно, открыты для клиентов всего мира и могут включать:
- опросы для получения отзывов
- исследовательские интервью
- сеансы тестирования удобства использования
- предварительный просмотр ранних прототипов или концепций.
Такие электронные письма редки, и можно выбрать, участвовать или нет. Если интересны дополнительные возможности для участия в исследовательских сеансах, можно добавиться в панель исследования клиентов GitHub. Дополнительные сведения см. в разделе [Исследования пользовательского опыта GitHub](https://cxr.github.com).
## Маркетинговые электронные письма
{% data variables.product.product_name %} иногда отправляет следующие типы маркетинговых электронных писем:
- советы и рекомендации по началу работы с учетной записью
- настраиваемая информация о привлекательных проектах и новых возможностях
- информационные бюллетени, на которые вы подписаны, например {% data variables.explore.explore_github %}
Дополнительные сведения см. в разделе [Управление маркетинговыми электронными письмами от GitHub](/articles/managing-marketing-emails-from-github).

View File

@@ -0,0 +1,99 @@
---
title: Сведения о личной панели мониторинга
redirect_from:
- /hidden/about-improved-navigation-to-commonly-accessed-pages-on-github
- /articles/opting-into-the-public-beta-for-a-new-dashboard
- /articles/about-your-personal-dashboard
- /github/setting-up-and-managing-your-github-user-account/about-your-personal-dashboard
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard
intro: 'Вы можете посетить свою личную панель мониторинга, чтобы отслеживать проблемы и запросы на вытягивание, над которыми вы работаете или на которые подписаны, переходить к своим главным репозиториям и страницам команд, следить за обновлениями последних действий в организациях и репозиториях, на которые вы подписаны, и изучить рекомендуемые репозитории.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Your personal dashboard
ms.openlocfilehash: ee22085e669eedec2e0a9f298cc4d5ad144316c6
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '146179154'
---
## Доступ к личной панели мониторинга
Личная панель мониторинга — это первая страница, которую вы видите при входе в {% data variables.product.product_name %}.
Чтобы получить доступ к личной панели мониторинга после входа, щелкните {% octicon "mark-github" aria-label="The github octocat logo" %} в левом верхнем углу любой страницы в {% data variables.product.product_name %}.
## Поиск последних действий
В разделе "Последние действия" веб-канала новостей можно быстро находить и отслеживать недавно обновленные проблемы и запросы на вытягивание, над которыми вы работаете. В разделе "Последние действия" можно просмотреть до 4 последних обновлений за последние две недели.
{% data reusables.dashboard.recent-activity-qualifying-events %}
## Поиск основных репозиториев и команд
Слева на панели мониторинга можно получить доступ к основным репозиториям и командам, которые вы используете.
![список репозиториев и команд из разных организаций](/assets/images/help/dashboard/repositories-and-teams-from-personal-dashboard.png)
Список основных репозиториев создается автоматически и может включать любой репозиторий, с которым вы взаимодействовали, независимо от того, принадлежит ли он непосредственно вашей учетной записи. Взаимодействие включает фиксацию и открытие или комментирование проблем и запросов на вытягивание. Список основных репозиториев невозможно изменить, но через 4 месяца после последнего взаимодействия репозитории удаляются из списка.
Можно также найти список недавно посещенных репозиториев, команд и досок проектов, щелкнув строку поиска в верхней части любой страницы в {% data variables.product.product_name %}.
## Обновление с использованием действий из сообщества
{% ifversion for-you-feed %} В главном разделе панели мониторинга есть два канала действий:
- Далее: действия пользователей, на которых вы подписаны, и репозиториев, за которыми вы следите.
- Для вас: действия и рекомендации на основе вашей сети {% data variables.product.product_name %}.
### Следующий веб-канал
В этом веб-канале показаны действия репозиториев и пользователей, к которым вы проявили прямой интерес, посредством подписки на них или просмотра репозитория. Например, вы увидите обновления, если пользователь, на которого вы подписаны:
{% else %} В разделе "Все действия" веб-канала новостей можно просматривать обновления от репозиториев, за которыми вы следите, и пользователей, на которых вы подписаны.
Вы увидите обновления на веб-канале новостей, когда пользователь, на которого вы подписаны: {% endif %}
- Отмечает репозиторий звездочкой.
- Подписывается на другого пользователя.{% ifversion fpt or ghes or ghec %}
- Создает общедоступный репозиторий. {% endif %}
- Открывает запрос на вытягивание с меткой "нужна помощь" или "проблема, возникшая впервые" в репозитории, за которым вы следите.
- Отправляет фиксации в репозитории, за которым вы следите.{% ifversion fpt or ghes or ghec %}
- Создает вилку для общедоступного репозитория. {% endif %}
- Публикует новый выпуск.
Дополнительные сведения о подписчиках и просмотре репозиториев см. в разделах [Подписчики](/get-started/exploring-projects-on-github/following-people) и [Социальность](/get-started/quickstart/be-social).
{% ifversion for-you-feed %}
### Для вашего веб-канала
{% note %}
**Примечание.** Эта новая вкладка в настоящее время доступна в общедоступной бета-версии и может быть изменена.
{% endnote %}
В этом веб-канале показаны действия и рекомендации на основе вашей сети в {% data variables.product.product_name %}. Он предназначен, чтобы предоставлять обновления, которые вас вдохновят, будут держать вас в курсе и помогут находить новые сообщества, частью которых вы хотите быть. Сеть включает в себя следующее:
- репозитории, отмеченные звездочками;
- репозитории, в которые вы внесли свой вклад;
- пользователей, на которых вы подписаны или которым оказываете спонсорскую поддержку;
- пользователей, с которыми вы совместно работали;
- организации, на которые вы подписаны.
{% endif %}
## Изучение рекомендуемых репозиториев
Справа на панели мониторинга в разделе "Изучение репозиториев" можно изучить рекомендуемые репозитории в сообществах. Рекомендации основаны на репозиториях, которые вы посетили или отметили звездочками, людях, на которых вы подписаны, и действиях в репозиториях, к которым у вас есть доступ. {% ifversion fpt or ghec %} Дополнительные сведения см. в статье [Поиск способов участия в работе над открытым кодом в {% data variables.product.prodname_dotcom %}](/github/getting-started-with-github/finding-ways-to-contribute-to-open-source-on-github).{% endif %}
## Дополнительные материалы
- [Сведения о панели мониторинга вашей организации](/articles/about-your-organization-dashboard)

View File

@@ -0,0 +1,97 @@
---
title: Changing your GitHub username
intro: 'You can change the username for your account on {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.location.product_location %} if your instance uses built-in authentication{% endif %}.'
redirect_from:
- /articles/how-to-change-your-username
- /articles/changing-your-github-user-name
- /articles/renaming-a-user
- /articles/what-happens-when-i-change-my-username
- /articles/changing-your-github-username
- /github/setting-up-and-managing-your-github-user-account/changing-your-github-username
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username
versions:
fpt: '*'
ghes: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Change your username
---
{% ifversion ghec or ghes %}
{% note %}
{% ifversion ghec %}
**Note**: Members of an {% data variables.enterprise.prodname_emu_enterprise %} cannot change usernames. Your enterprise's IdP administrator controls your username for {% data variables.product.product_name %}. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)."
{% elsif ghes %}
**Note**: If you sign into {% data variables.location.product_location %} with LDAP credentials or single sign-on (SSO), only your local administrator can change your username. For more information about authentication methods for {% data variables.product.product_name %}, see "[Authenticating users for {% data variables.location.product_location %}](/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance)."
{% endif %}
{% endnote %}
{% endif %}
## About username changes
You can change your username to another username that is not currently in use.{% ifversion fpt or ghec %} If the username you want is not available, consider other names or unique variations. Using a number, hyphen, or an alternative spelling might help you find a similar username that's still available.
If you hold a trademark for the username, you can find more information about making a trademark complaint on our [Trademark Policy](/free-pro-team@latest/github/site-policy/github-trademark-policy) page.
If you do not hold a trademark for the name, you can choose another username or keep your current username. {% data variables.contact.github_support %} cannot release the unavailable username for you. For more information, see "[Changing your username](#changing-your-username)."{% endif %}
After changing your username, your old username becomes available for anyone else to claim. Most references to your repositories under the old username automatically change to the new username. However, some links to your profile won't automatically redirect.
{% data variables.product.product_name %} cannot set up redirects for:
- [@mentions](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams) using your old username
- Links to [gists](/articles/creating-gists) that include your old username
{% ifversion fpt or ghec %}
If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you cannot make changes to your username. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% endif %}
## Repository references
After you change your username, {% data variables.product.product_name %} will automatically redirect references to your repositories.
- Web links to your existing repositories will continue to work. This can take a few minutes to complete after you make the change.
- Command line pushes from your local repository clones to the old remote tracking URLs will continue to work.
If the new owner of your old username creates a repository with the same name as your repository, that will override the redirect entry and your redirect will stop working. Because of this possibility, we recommend you update all existing remote repository URLs after changing your username. For more information, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)."
## Links to your previous profile page
After changing your username, links to your previous profile page, such as `https://{% data variables.command_line.backticks %}/previoususername`, will return a 404 error. We recommend updating any links to your account on {% data variables.location.product_location %} from elsewhere{% ifversion fpt or ghec %}, such as your LinkedIn or Twitter profile{% endif %}.
## Your Git commits
{% ifversion fpt or ghec %}Git commits that were associated with your {% data variables.product.product_name %}-provided `noreply` email address won't be attributed to your new username and won't appear in your contributions graph.{% endif %} If your Git commits are associated with another email address you've [added to your GitHub account](/articles/adding-an-email-address-to-your-github-account), {% ifversion fpt or ghec %}including the ID-based {% data variables.product.product_name %}-provided `noreply` email address, {% endif %}they'll continue to be attributed to you and appear in your contributions graph after you've changed your username. For more information on setting your email address, see "[Setting your commit email address](/articles/setting-your-commit-email-address)."
## Your gists
After changing your username, the URLs to any public or secret gists will also change and previous links to these will return a 404 error. We recommend updating the links to these gists anywhere you may have shared them.
## Changing your username
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.account_settings %}
3. In the "Change username" section, click **Change username**.
![Change Username button](/assets/images/help/settings/settings-change-username.png){% ifversion fpt or ghec %}
4. Read the warnings about changing your username. If you still want to change your username, click **I understand, let's change my username**.
![Change Username warning button](/assets/images/help/settings/settings-change-username-warning-button.png)
5. Type a new username.
![New username field](/assets/images/help/settings/settings-change-username-enter-new-username.png)
6. If the username you've chosen is available, click **Change my username**. If the username you've chosen is unavailable, you can try a different username or one of the suggestions you see.
![Change Username warning button](/assets/images/help/settings/settings-change-my-username-button.png)
{% endif %}
## Further reading
- "[Why are my commits linked to the wrong user?](/pull-requests/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user)"{% ifversion fpt or ghec %}
- "[{% data variables.product.prodname_dotcom %} Username Policy](/free-pro-team@latest/github/site-policy/github-username-policy)"{% endif %}

View File

@@ -0,0 +1,39 @@
---
title: Управление параметрами учетной записи пользователя
intro: 'Вы можете управлять параметрами личной учетной записи, включая тему, имя пользователя, ветвь по умолчанию, специальные возможности и параметры безопасности.'
redirect_from:
- /categories/29/articles
- /categories/user-accounts
- /articles/managing-user-account-settings
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
children:
- /about-your-personal-dashboard
- /managing-your-theme-settings
- /managing-your-tab-size-rendering-preference
- /changing-your-github-username
- /permission-levels-for-a-personal-account-repository
- /permission-levels-for-a-project-board-owned-by-a-personal-account
- /managing-accessibility-settings
- /managing-the-default-branch-name-for-your-repositories
- /managing-security-and-analysis-settings-for-your-personal-account
- /managing-access-to-your-personal-accounts-project-boards
- /managing-your-cookie-preferences-for-githubs-enterprise-marketing-pages
- /integrating-jira-with-your-personal-projects
- /what-does-the-available-for-hire-checkbox-do
shortTitle: Personal account settings
ms.openlocfilehash: fcb653fa2fd40c206deefdaf967bae6104393537
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '147760866'
---

View File

@@ -0,0 +1,30 @@
---
title: Integrating Jira with your personal projects
intro: 'You can integrate Jira Cloud with your personal account to scan commits and pull requests, creating relevant metadata and hyperlinks in any mentioned Jira issues.'
redirect_from:
- /articles/integrating-jira-with-your-personal-projects
- /github/setting-up-and-managing-your-github-user-account/integrating-jira-with-your-personal-projects
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects
versions:
ghes: '*'
ghae: '*'
shortTitle: Integrate Jira with projects
---
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.developer_settings %}
{% data reusables.user-settings.oauth_apps %}
1. Click **Register a new application**.
2. Under **Application name**, type "Jira".
3. Under **Homepage URL**, type the full URL to your Jira instance.
4. Under **Authorization callback URL**, type the full URL to your Jira instance.
5. Click **Register application**.
![Register application button](/assets/images/help/oauth/register-application-button.png)
8. Under **Developer applications**, note the "Client ID" and "Client Secret" values.
![Client ID and Client Secret](/assets/images/help/oauth/client-id-and-secret.png)
{% data reusables.user-settings.jira_help_docs %}
## Further reading
- ["Integrating Jira with your organization project board"](/articles/integrating-jira-with-your-organization-project-board)
- <a href="https://confluence.atlassian.com/adminjiracloud/connect-jira-cloud-to-github-814188429.html" data-proofer-ignore>Connect Jira Cloud to GitHub</a> (Atlassian documentation)

View File

@@ -0,0 +1,39 @@
---
title: Управление доступом к панелям проектов личной учетной записи
intro: Владелец доски проекта может добавлять или удалять участников совместной работы и настраивать разрешения таких участников на доступ к доске проекта.
redirect_from:
- /articles/managing-project-boards-in-your-repository-or-organization
- /articles/managing-access-to-your-user-account-s-project-boards
- /articles/managing-access-to-your-user-accounts-project-boards
- /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-user-accounts-project-boards
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-access-to-your-user-accounts-project-boards
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Manage access project boards
ms.openlocfilehash: 4cbf968cee79ac8e4aafbc5eea8220949cf80a30
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: '145165219'
---
Участник совместной работы — это пользователь с разрешениями на доступ к панели проекта, владельцем которой вы являетесь. По умолчанию участнику совместной работы предоставляются разрешения на чтение. Дополнительные сведения см. в разделе [Уровни разрешений для панелей проектов, принадлежащих пользователю](/articles/permission-levels-for-user-owned-project-boards).
## Приглашение участников совместной работы в панель проекта, принадлежащую пользователю
1. Перейдите к панели проекта, в которую требуется добавить участника совместной работы.
{% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} {% data reusables.project-management.collaborator-option %}
5. В разделе "Поиск по имени пользователя, полному имени или адресу электронной почты" введите имя участника совместной работы, имя пользователя или адрес электронной почты {% data variables.product.prodname_dotcom %}.
![Раздел "Участники совместной работы"; в поле поиска введено имя пользователя Octocat](/assets/images/help/projects/org-project-collaborators-find-name.png) {% data reusables.project-management.add-collaborator %}
7. Новый участник совместной работы по умолчанию получает разрешения на чтение. При необходимости можно выбрать другой уровень разрешений в раскрывающемся меню рядом с именем нового участника.
![Раздел "Участники совместной работы"; выбрано раскрывающееся меню "Разрешения"](/assets/images/help/projects/user-project-collaborators-edit-permissions.png)
## Удаление участника совместной работы из панели проекта, принадлежащей пользователю
{% data reusables.project-management.click-menu %} {% data reusables.project-management.access-collaboration-settings %} {% data reusables.project-management.collaborator-option %} {% data reusables.project-management.remove-collaborator %}

View File

@@ -0,0 +1,51 @@
---
title: Managing accessibility settings
shortTitle: Manage accessibility settings
intro: '{% data variables.product.product_name %}''s user interface can adapt to your vision, hearing, motor, cognitive, or learning needs.'
versions:
feature: keyboard-shortcut-accessibility-setting
redirect_from:
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-accessibility-settings
type: how_to
miniTocMaxHeadingLevel: 3
---
## About accessibility settings
To create an experience on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} that fits your needs, you can customize the user interface. Accessibility settings can be essential for people with disabilities, but can be useful to anyone. For example, customization of keyboard shortcuts is essential to people who navigate using voice control, but can be useful to anyone when a keyboard shortcut for {% data variables.product.product_name %} clashes with another application shortcut.
## Managing accessibility settings
You can decide whether you want to use some or all keyboard shortcuts on {% ifversion fpt or ghec %}{% data variables.location.product_location %}{% elsif ghes or ghae %}the website for {% data variables.location.product_location %}{% endif %}, and you can control the display of animated images.
### Managing keyboard shortcuts
You can perform actions across the {% data variables.product.product_name %} website by using your keyboard alone. Keyboard shortcuts can be useful to save time, but can be activated accidentally or interfere with assistive technology.
By default, all keyboard shortcuts are enabled on {% data variables.product.product_name %}. For more information, see "[Keyboard shortcuts](/get-started/using-github/keyboard-shortcuts)."
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.accessibility_settings %}
1. Under "Keyboard shortcuts", manage settings for your keyboard shortcuts.
- To disable shortcut keys that don't use modifiers keys like <kbd>Control</kbd> or <kbd>Command</kbd>, under "General", deselect **Character keys**.
- If you disable character keys, you may still be able to trigger shortcuts for your web browser, and you can still trigger shortcuts for {% data variables.product.product_name %} that use a modifier key.
{%- ifversion command-palette %}
- To customize the keyboard shortcuts for triggering the command palette, under "Command palette", use the drop-down menus to choose a keyboard shortcut. For more information, see "[{% data variables.product.company_short %} Command Palette](/get-started/using-github/github-command-palette)."
{%- endif %}
{% ifversion motion-management %}
### Managing motion
You can control how {% data variables.product.product_name %} displays animated _.gif_ images.
By default, {% data variables.product.product_name %} syncs with your system-level preference for reduced motion. For more information, see the documentation or settings for your operating system.
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.accessibility_settings %}
1. Under "Motion", manage settings for motion.
- To control how {% data variables.product.product_name %} displays animated images, under "Autoplay animated images", select **Sync with system**, **Enabled**, or **Disabled**.
{% endif %}

View File

@@ -0,0 +1,54 @@
---
title: Managing security and analysis settings for your personal account
intro: 'You can control features that secure and analyze the code in your projects on {% data variables.product.prodname_dotcom %}.'
versions:
fpt: '*'
ghec: '*'
ghes: '*'
topics:
- Accounts
redirect_from:
- /github/setting-up-and-managing-your-github-user-account/managing-security-and-analysis-settings-for-your-user-account
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-security-and-analysis-settings-for-your-user-account
shortTitle: Manage security & analysis
---
## About management of security and analysis settings
{% data variables.product.prodname_dotcom %} can help secure your repositories. This topic tells you how you can manage the security and analysis features for all your existing or new repositories.
You can still manage the security and analysis features for individual repositories. For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)."
You can also review the security log for all activity on your personal account. For more information, see "[Reviewing your security log](/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log)."
{% data reusables.security.some-security-and-analysis-features-are-enabled-by-default %}
{% data reusables.security.security-and-analysis-features-enable-read-only %}
For an overview of repository-level security, see "[Securing your repository](/code-security/getting-started/securing-your-repository)."
## Enabling or disabling features for existing repositories
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.security-analysis %}
3. Under "Code security and analysis", to the right of the feature, click **Disable all** or **Enable all**.
{% ifversion ghes %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/enterprise/3.3/settings/security-and-analysis-disable-or-enable-all.png){% else %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/help/settings/security-and-analysis-disable-or-enable-all.png){% endif %}
6. Optionally, enable the feature by default for new repositories that you own.
{% ifversion ghes %}!["Enable by default" option for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-by-default-in-modal.png){% else %}!["Enable by default" option for new repositories](/assets/images/help/settings/security-and-analysis-enable-by-default-in-modal.png){% endif %}
7. Click **Disable FEATURE** or **Enable FEATURE** to disable or enable the feature for all the repositories you own.
{% ifversion ghes %}![Button to disable or enable feature](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-dependency-graph.png){% else %}![Button to disable or enable feature](/assets/images/help/settings/security-and-analysis-enable-dependency-graph.png){% endif %}
{% data reusables.security.displayed-information %}
## Enabling or disabling features for new repositories
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.security-analysis %}
3. Under "Code security and analysis", to the right of the feature, enable or disable the feature by default for new repositories that you own.
{% ifversion ghes %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% else %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/help/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% endif %}
## Further reading
- "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)"
- "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)"
- "[Keeping your dependencies updated automatically](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically)"

View File

@@ -0,0 +1,36 @@
---
title: Managing the default branch name for your repositories
intro: 'You can set the default branch name for new repositories that you create on {% data variables.location.product_location %}.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
redirect_from:
- /github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories
shortTitle: Manage default branch name
---
## About management of the default branch name
When you create a new repository on {% data variables.location.product_location %}, the repository contains one branch, which is the default branch. You can change the name that {% data variables.product.product_name %} uses for the default branch in new repositories you create. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
{% data reusables.branches.change-default-branch %}
## Setting the default branch name
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.repo-tab %}
3. Under "Repository default branch", click **Change default branch name now**.
![Override button](/assets/images/help/settings/repo-default-name-button.png)
4. Type the default name that you would like to use for new branches.
![Text box for entering default name](/assets/images/help/settings/repo-default-name-text.png)
5. Click **Update**.
![Update button](/assets/images/help/settings/repo-default-name-update.png)
## Further reading
- "[Managing the default branch name for repositories in your organization](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)"

View File

@@ -0,0 +1,38 @@
---
title: Управление настройками файлов cookie для корпоративных маркетинговых страниц GitHub
intro: 'Вы можете управлять тем, как {% data variables.product.company_short %} использует сведения от необязательных файлов cookie отслеживания для корпоративных маркетинговых страниц.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Manage cookie preferences
ms.openlocfilehash: 44f0324a91f8447a10947d5f5c7be111241ad091
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/25/2022
ms.locfileid: '148108811'
---
## Сведения о настройках файлов cookie на корпоративных маркетинговых страницах
{% data variables.product.company_short %} может использовать необязательные файлы cookie на некоторых корпоративных маркетинговых страницах. Вы можете настроить поведение этих файлов cookie. Дополнительные сведения о том, как {% data variables.product.company_short %} использует файлы cookie, см. в разделе [Заявление о конфиденциальности {% data variables.product.company_short %}](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement).
## Изменение настроек файлов cookie
Вы можете настроить поведение необязательных файлов cookie на любой корпоративной маркетинговой странице {% data variables.product.company_short %}.
1. Перейдите на корпоративную маркетинговую страницу {% data variables.product.company_short %}, где вы хотите изменить настройки файлов cookie. Например, перейдите в раздел [Ресурсы {% data variables.product.company_short %}](https://resources.github.com/).
1. Прокрутите до нижней части списка и нажмите кнопку **Управлять файлами cookie**.
![Снимок экрана: кнопка для управления параметрами файлов cookie.](/assets/images/help/settings/cookie-settings-manage.png)
1. Чтобы принять или отклонить каждый необязательный файл cookie, нажмите кнопку **Принять** или **Отклонить** в разделе "Управление настройками файлов cookie".
![Снимок экрана: переключатели, чтобы выбрать "Принять" или "Отклонить" для необязательных файлов cookie.](/assets/images/help/settings/cookie-settings-accept-or-reject.png)
1. Нажмите кнопку **Сохранить изменения**.
![Снимок экрана: кнопка для сохранения изменений.](/assets/images/help/settings/cookie-settings-save.png)

View File

@@ -0,0 +1,26 @@
---
title: Настройка отрисовки размера шага табуляции
intro: 'Вы можете управлять количеством пробелов, равным табуляции для личной учетной записи.'
versions:
fpt: '*'
ghae: '>= 3.4'
ghes: '>=3.4'
ghec: '*'
topics:
- Accounts
shortTitle: Managing your tab size
redirect_from:
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference
ms.openlocfilehash: e3188b508e5ffb84266bc4b7689a5cbc16aa07de
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145165348'
---
Если вас не устраивает размер шага табуляции, который используется для отступов в коде в {% data variables.product.product_name %}, его можно изменить в разделе параметров.
{% data reusables.user-settings.access_settings %}
1. На левой боковой панели щелкните **{% octicon "paintbrush" aria-label="The paintbrush icon" %} Внешний вид**.
2. В разделе "Размер шага табуляции" выберите нужное значение в раскрывающемся меню.
![Кнопка настройки шага табуляции](/assets/images/help/settings/tab-size-preference.png )

View File

@@ -0,0 +1,63 @@
---
title: Managing your theme settings
intro: 'You can manage how {% data variables.product.product_name %} looks to you by setting a theme preference that either follows your system settings or always uses a light or dark mode.'
versions:
fpt: '*'
ghae: '*'
ghes: '*'
ghec: '*'
topics:
- Accounts
redirect_from:
- /github/setting-up-and-managing-your-github-user-account/managing-your-theme-settings
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings
shortTitle: Manage theme settings
---
For choice and flexibility in how and when you use {% data variables.product.product_name %}, you can configure theme settings to change how {% data variables.product.product_name %} looks to you. You can choose from themes that are light or dark, or you can configure {% data variables.product.product_name %} to follow your system settings.
You may want to use a dark theme to reduce power consumption on certain devices, to reduce eye strain in low-light conditions, or because you prefer how the theme looks.
If you have low vision, you may benefit from a high contrast theme, with greater contrast between foreground and background elements.{% ifversion fpt or ghae or ghec %} If you have colorblindness, you may benefit from our light and dark colorblind themes.
{% endif %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.appearance-settings %}
1. Under "Theme mode", select the drop-down menu, then click a theme preference.
![Drop-down menu under "Theme mode" for selection of theme preference](/assets/images/help/settings/theme-mode-drop-down-menu.png)
1. Click the theme you'd like to use.
- If you chose a single theme, click a theme.
{%- ifversion ghes = 3.5 %}
{% note %}
**Note**: The light high contrast theme was unavailable in {% data variables.product.product_name %} 3.5.0, 3.5.1, 3.5.2, and 3.5.3. The theme is available in 3.5.4 and later. For more information about upgrades, contact your site administrator.
For more information about determining the version of {% data variables.product.product_name %} you're using, see "[About versions of {% data variables.product.prodname_docs %}](/get-started/learning-about-github/about-versions-of-github-docs#github-enterprise-server)."
{% endnote %}
{%- endif %}
![Radio buttons for the choice of a single theme](/assets/images/help/settings/theme-choose-a-single-theme-highcontrast.png)
- If you chose to follow your system settings, click a day theme and a night theme.
![Buttons for the choice of a theme to sync with the system setting](/assets/images/help/settings/theme-choose-a-day-and-night-theme-to-sync-highcontrast.png)
{% ifversion fpt or ghec %}
- If you would like to choose a theme which is currently in public beta, you will first need to enable it with feature preview. For more information, see "[Exploring early access releases with feature preview](/get-started/using-github/exploring-early-access-releases-with-feature-preview)."{% endif %}
{% ifversion command-palette %}
{% note %}
**Note:** You can also change your theme settings with the command palette. For more information, see "[{% data variables.product.prodname_command_palette %}](/get-started/using-github/github-command-palette)".
{% endnote %}
{% endif %}
## Further reading
- "[Setting a theme for {% data variables.product.prodname_desktop %}](/desktop/installing-and-configuring-github-desktop/setting-a-theme-for-github-desktop)"

View File

@@ -0,0 +1,98 @@
---
title: Уровни разрешений для репозитория личной учетной записи
intro: 'Репозиторий, принадлежащий личной учетной записи, имеет два уровня разрешений: владелец репозитория и участники совместной работы.'
redirect_from:
- /articles/permission-levels-for-a-user-account-repository
- /github/setting-up-and-managing-your-github-user-account/permission-levels-for-a-user-account-repository
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-a-user-account-repository
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Repository permissions
ms.openlocfilehash: dd2124c23054fa7bd44bb6501dae4363e59bab75
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/27/2022
ms.locfileid: '148113876'
---
## Сведения об уровнях разрешений для репозитория личной учетной записи
Репозитории, принадлежащие личным учетным записям, имеют одного владельца. Разрешения на владение невозможно использовать совместно с другой личной учетной записью.
Можно также {% ifversion fpt or ghec %}приглашать{% else %}добавлять{% endif %} пользователей в {% data variables.product.product_name %} в репозиторий в качестве участников совместной работы. Дополнительные сведения см. в статье [Приглашение участников совместной работы в личный репозиторий](/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository).
{% tip %}
**Совет.** Если вам требуется более детализированный доступ к репозиторию, принадлежащему вашей личной учетной записи, рассмотрите возможность переноса репозитория в организацию. Дополнительные сведения см. в разделе [Перенос репозитория](/github/administering-a-repository/transferring-a-repository#transferring-a-repository-owned-by-your-personal-account).
{% endtip %}
## Доступ владельца к репозиторию, принадлежащему личной учетной записи
Владелец репозитория полностью его контролирует. Помимо действий, которые может выполнять любой участник совместной работы, владелец репозитория может выполнять следующее.
| Действие | Дополнительные сведения |
| :- | :- |
| {% ifversion fpt or ghec %}Приглашение участников совместной работы{% else %}Добавление участников совместной работы{% endif %} | [Приглашение участников совместной работы в личный репозиторий](/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository) |
| Изменение видимости репозитория | [Настройка видимости репозитория](/github/administering-a-repository/setting-repository-visibility) |{% ifversion fpt or ghec %}
| Ограничение взаимодействия с репозиторием | [Ограничение взаимодействий в вашем репозитории](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository) |{% endif %}
| Переименование ветви, включая ветвь по умолчанию | [Переименование ветви](/github/administering-a-repository/renaming-a-branch) |
| Слияние запросов на вытягивание в защищенной ветви даже при отсутствии проверок для утверждения | [Сведения о защищенных ветвях](/github/administering-a-repository/about-protected-branches) |
| Удаление репозитория | [Удаление репозитория](/repositories/creating-and-managing-repositories/deleting-a-repository) |
| Управление темами репозитория | [Классификация репозитория с помощью тем](/github/administering-a-repository/classifying-your-repository-with-topics) |{% ifversion fpt or ghec %}
| Управление параметрами безопасности и анализа для репозитория | [Управление параметрами безопасности и анализа для репозитория](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository) |{% endif %}{% ifversion fpt or ghec %}
| Включение графа зависимостей для частного репозитория | [Изучение зависимостей репозитория](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository) |{% endif %}
| удалять и восстанавливать пакет; | "[Удаление и восстановление пакета](/packages/learn-github-packages/deleting-and-restoring-a-package)" |
| Настройка предварительной версии социальных сетей репозитория | [Настройка предварительной версии социальных сетей репозитория](/github/administering-a-repository/customizing-your-repositorys-social-media-preview) |
| Создание шаблона из репозитория | [Создание репозитория шаблонов](/github/creating-cloning-and-archiving-repositories/creating-a-template-repository) |
| Управление доступом к {% data variables.product.prodname_dependabot_alerts %}| [Управление параметрами безопасности и анализа для репозитория](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts) |{% ifversion fpt or ghec %}
| Закрытие {% data variables.product.prodname_dependabot_alerts %} в репозитории | [Просмотр и обновление {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts) |
| Управление использованием данных для частного репозитория | [Управление параметрами использования данных для частного репозитория](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository)|{% endif %}
| Определение владельцев кода для репозитория | [О владельцах кода](/github/creating-cloning-and-archiving-repositories/about-code-owners) |
| Архивация репозитория | [Архивация репозиториев](/repositories/archiving-a-github-repository/archiving-repositories) |{% ifversion fpt or ghec %}
| Создание рекомендаций по безопасности | [Сведения о рекомендациях по безопасности репозитория](/github/managing-security-vulnerabilities/about-github-security-advisories) |
| Отображение кнопки спонсора | [Отображение кнопки спонсора в репозитории](/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) |{% endif %}
| Разрешение или запрет автоматического слияния для запросов на вытягивание | [Управление автоматическим слиянием для запросов на вытягивание в репозитории](/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository) |
| Управление веб-перехватчиками и развертывание ключей | [Управление ключами развертывания](/developers/overview/managing-deploy-keys#deploy-keys) |
## Доступ участника совместной работы к репозиторию, принадлежащему личной учетной записи
Участники совместной работы могут вытягивать (читать) содержимое из репозитория и отправлять (записывать) изменения в репозиторий.
{% note %}
**Примечание.** В частном репозитории владельцы могут предоставлять участникам совместной работы только доступ для записи. Участники совместной работы не могут иметь доступ только для чтения к репозиториям, принадлежащим личной учетной записи.
{% endnote %}
Участники совместной работы также могут выполнять следующие действия.
| Действие | Дополнительные сведения |
| :- | :- |
| Создание вилки репозитория | [Сведения о вилках](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) |
| Переименование ветви, отличной от ветви по умолчанию | [Переименование ветви](/github/administering-a-repository/renaming-a-branch) |
| Создание, изменение и удаление комментариев о фиксациях, запросах на вытягивание и проблемах репозитория | <ul><li>[Сведения о проблемах](/github/managing-your-work-on-github/about-issues)</li><li>[Комментирование запроса на вытягивание](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)</li><li>[Управление комментариями, которые мешают работе](/communities/moderating-comments-and-conversations/managing-disruptive-comments)</li></ul> |
| Создание, назначение, закрытие и повторное открытие проблем в репозитории | [Управление работой с проблемами](/github/managing-your-work-on-github/managing-your-work-with-issues) |
| Управление метками для проблем и запросов на вытягивание в репозитории | [Проблемы с метками и запросы на вытягивание](/github/managing-your-work-on-github/labeling-issues-and-pull-requests) |
| Управление вехами для проблем и запросов на вытягивание в репозитории | [Создание и изменение вех для проблем и запросов на вытягивание](/github/managing-your-work-on-github/creating-and-editing-milestones-for-issues-and-pull-requests) |
| Пометка проблем или запросов на вытягивание в репозитории как повторяющихся | [Сведения о дубликатах проблем и запросов на вытягивание](/github/managing-your-work-on-github/about-duplicate-issues-and-pull-requests) |
| Создание, слияние и закрытие запросов на вытягивание в репозитории | [Предложение изменений в работе с запросами на вытягивание](/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) |
| Включение и отключение автоматического слияния для запроса на вытягивание | [Автоматическое слияние для запроса на вытягивание](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)
| Применение предлагаемых изменений к запросам на вытягивание в репозитории |[Внедрение отзывов в запрос на вытягивание](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request) |
| Создание запроса на вытягивание из вилки репозитория | [Создание запроса на вытягивание из вилки](/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) |
| Отправка проверки запроса на вытягивание, которая влияет на возможность слияния для запроса на вытягивание | [Просмотр предлагаемых изменений в запросе на вытягивание](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request) |
| Создание и изменение вики-сайта для репозитория | [Сведения о вики-сайтах](/communities/documenting-your-project-with-wikis/about-wikis) |
| Создание и изменение выпусков для репозитория | [Управление выпусками в репозитории](/github/administering-a-repository/managing-releases-in-a-repository) |
| Выполнение роли владельца кода для репозитория | [О владельцах кода](/articles/about-code-owners) |{% ifversion fpt or ghae or ghec %}
| Публикация, просмотр или установка пакетов | [Публикация пакетов и управление ими](/github/managing-packages-with-github-packages/publishing-and-managing-packages) |{% endif %}
| Удаление себя в качестве участника совместной работы из репозитория | [Удаление себя из репозитория участника совместной работы](/github/setting-up-and-managing-your-github-user-account/removing-yourself-from-a-collaborators-repository) |
## Дополнительные материалы
- [Роли репозитория для организации](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)

View File

@@ -0,0 +1,70 @@
---
title: 'Уровни разрешений для доски проекта, принадлежащей личной учетной записи'
intro: 'На доске проекта, принадлежащей личной учетной записи, есть два уровня разрешений: владелец доски проекта и участники совместной работы.'
redirect_from:
- /articles/permission-levels-for-user-owned-project-boards
- /github/setting-up-and-managing-your-github-user-account/permission-levels-for-user-owned-project-boards
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/permission-levels-for-user-owned-project-boards
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Project board permissions
ms.openlocfilehash: 353b9ac497abc7110437aafdf691ca48a3ff6cec
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145165345'
---
## Permissions overview (Общие сведения о разрешениях)
Владелец у доски проекта, принадлежащей пользователю, может быть только один; это разрешение не может быть предоставлено другой личной учетной записи. Помимо владельца, над досками проектов могут совместно работать и другие пользователи.
Существует три уровня разрешений для участников совместной работы над доской проекта:
{% data reusables.project-management.project-board-permissions %}
## Разрешения владельца и администратора для доски проекта, принадлежащей пользователю
Владелец доски проекта и участники совместной работы с разрешениями администратора имеют полный контроль над доской проекта. Помимо всех разрешений, предоставленных участниками совместной работы над доской проектов, владелец доски проекта и участник совместной работы с разрешениями администратора могут:
- [Управлять, просматривать и добавлять участников совместной работы](/articles/managing-access-to-your-user-account-s-project-boards)
- [Настроить доску проекта как {% ifversion ghae %}внутреннюю{% else %}общедоступную{% endif %} или частную](/articles/changing-project-board-visibility)
- [Удалить доску проекта](/articles/deleting-a-project-board/)
- [Закрыть доску проекта](/articles/closing-a-project-board/)
- [Открыть ранее закрытую доску проекта](/articles/reopening-a-closed-project-board)
## Разрешения на чтение и запись для доски проекта, принадлежащей пользователю
Участники совместной работы с доступом для чтения доски проекта, принадлежащей пользователю, могут:
- Просматривать доску проекта
- Копировать доску проекта
- Фильтровать карточки на доске проекта
Участники совместной работы с доступом для записи на доску проекта, принадлежащую пользователю, могут:
- Просматривать доску проекта
- Копировать доску проекта
- Фильтровать карточки на доске проекта
- Редактировать доску проекта
- Связывать репозиторий с доской проекта
- Настраивать автоматизацию для доски проекта
- Копировать доску проекта
- Добавлять проблемы и запросы на вытягивание к доске проекта
- Добавлять примечания к доске проекта
- Отслеживать прогресс на доске проекта
- Архивировать карточки на доске проекта
## Видимость панели проекта.
Видимость доски проекта можно изменить с частной на {% ifversion ghae %}внутреннюю{% else %}общедоступную{% endif %} и обратно. По умолчанию доски проектов, принадлежащие пользователю, являются частными. Дополнительные сведения см. в разделе [Изменение видимости панели проекта](/articles/changing-project-board-visibility).
## Дополнительные материалы
- [Управление доступом к доскам проектов личной учетной записи](/articles/managing-access-to-your-user-account-s-project-boards)

View File

@@ -0,0 +1,34 @@
---
title: Для чего предназначен флажок "Доступен для найма"?
intro: 'Используйте флажок **Доступно для найма**, чтобы просмотреть публикации GitHub Jobs в GitHub.'
redirect_from:
- /articles/what-does-the-available-for-hire-checkbox-do
- /github/setting-up-and-managing-your-github-user-account/what-does-the-available-for-hire-checkbox-do
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/what-does-the-available-for-hire-checkbox-do
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Available for hire checkbox
ms.openlocfilehash: 1f7f188ae86093478385f7f569ec37c3479a7661
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145165241'
---
{% warning %}
Примечание об устаревании. Сайт вакансий GitHub признан устаревшим. Последняя дата публикации вакансии — 19 мая 2021 г. Сайт вакансий GitHub закрылся 19 августа 2021 г. Все запросы к нему теперь перенаправляются к уведомлению в [записи блога GitHub](https://github.blog/changelog/2021-04-19-deprecation-notice-github-jobs-site/), в котором содержатся дополнительные сведения о признании сайта вакансий GitHub устаревшими.
{% endwarning %}
Для поиска работы в сфере технологий рекомендуется использовать панель [Вакансии GitHub](https://jobs.github.com/). Вы можете настроить просмотр публикуемых на ней вакансий на своей панели мониторинга GitHub.
![Объявления о вакансиях GitHub на панели мониторинга](/assets/images/help/settings/jobs-ads-on-dashboard.png)
{% data reusables.user-settings.access_settings %}
2. В разделе "Профиль вакансий" выберите **Доступен для найма** и щелкните **Сохранить профиль вакансий**.
![Параметры профиля вакансий](/assets/images/help/settings/jobs-profile-settings.png)

View File

@@ -0,0 +1,59 @@
---
title: Сведения о членстве в организации
intro: 'Вы можете стать участником организации, чтобы работать совместно с коллегами или участниками разработки ПО с открытым кодом одновременно в нескольких репозиториях.'
redirect_from:
- /articles/about-organization-membership
- /github/setting-up-and-managing-your-github-user-account/about-organization-membership
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/about-organization-membership
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Organization membership
ms.openlocfilehash: be1f2901ed18c98edf5e05c453dec5d3c443955f
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145165436'
---
Владелец организации может пригласить вас присоединиться к ней в качестве участника, менеджера по выставлению счетов или владельца. Владелец организации или участник с правами администратора репозитория может пригласить вас к сотрудничеству в одном или нескольких репозиториях в качестве внешнего участника совместной работы. Дополнительные сведения см. в статье "[Роли в организации](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)".
Организации, в которых вы участвуете, доступны на странице вашего профиля. Дополнительные сведения см. в разделе [Доступ для организации](/articles/accessing-an-organization).
Когда вы принимаете приглашение присоединиться к организации, владельцы организации могут просматривать следующие сведения:
- данные вашего общедоступного профиля;
- Ваш адрес электронной почты
- включена ли у вас двухфакторная авторизация;
- репозитории, к которым у вас есть доступ в организации, и уровень этого доступа;
- некоторые действия в организации;
- страна, откуда поступил запрос;
- ваш IP-адрес.
Дополнительные сведения см. в <a href="/articles/github-privacy-statement/" class="dotcom-only">заявлении о конфиденциальности {% data variables.product.prodname_dotcom %}</a>.
{% note %}
**Примечание**. Владельцы не могут просматривать IP-адреса участников в журнале аудита организации. В случае инцидента безопасности, например компрометации учетной записи или случайного раскрытия конфиденциальных данных, владельцы организации могут запросить сведения о доступе к частным репозиториям. Возвращаемые нами сведения могут содержать ваш IP-адрес.
{% endnote %}
По умолчанию для участника организации настроен частный уровень видимости. Вы можете сообщить о членстве в отдельных организациях в своем профиле. Дополнительные сведения см. в разделе [Публикация или скрытие сведений о членстве в организации](/articles/publicizing-or-hiding-organization-membership).
{% ifversion fpt or ghec %}
Если ваша организация принадлежит к корпоративной учетной записи, вы автоматически являетесь участником этой учетной записи и сведения о вас доступны ее владельцам. Дополнительные сведения см. в разделе [Сведения о корпоративных учетных записях](/enterprise-cloud@latest/admin/overview/about-enterprise-accounts){% ifversion fpt %}" в документации по {% data variables.product.prodname_ghe_cloud %}.{% else %}."{% endif %}
{% endif %}
Вы можете в любое время покинуть организацию. Дополнительные сведения см. в разделе [Удаление себя из организации](/articles/removing-yourself-from-an-organization).
## Дополнительные материалы
- [Сведения об организациях](/articles/about-organizations)
- [Управление членством в организациях](/articles/managing-your-membership-in-organizations)

View File

@@ -0,0 +1,32 @@
---
title: Доступ для организации
intro: 'Чтобы получить доступ к организации, членом которой вы являетесь, необходимо войти в личную учетную запись.'
redirect_from:
- /articles/error-cannot-log-in-that-account-is-an-organization
- /articles/cannot-log-in-that-account-is-an-organization
- /articles/how-do-i-access-my-organization-account
- /articles/accessing-an-organization
- /github/setting-up-and-managing-your-github-user-account/accessing-an-organization
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/accessing-an-organization
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
ms.openlocfilehash: 3c2e98d1b28d347ba901b6d0feed15aa54c7609c
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145165216'
---
{% tip %}
**Совет**. Просматривать и изменять параметры учетной записи для организации могут только владельцы организации.
{% endtip %}
{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %}

View File

@@ -0,0 +1,31 @@
---
title: Управление членством в организациях
intro: 'Если вы являетесь участником организации, вы можете обнародовать или скрыть свое членство, просмотреть роли других пользователей и удалить себя из организации.'
redirect_from:
- /articles/managing-your-membership-in-organizations
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
children:
- /about-organization-membership
- /accessing-an-organization
- /viewing-peoples-roles-in-an-organization
- /requesting-organization-approval-for-oauth-apps
- /publicizing-or-hiding-organization-membership
- /managing-your-scheduled-reminders
- /removing-yourself-from-an-organization
shortTitle: Manage organization membership
ms.openlocfilehash: 6cd19e2321d928b73942d99f46a48b0501d813fb
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145165072'
---

View File

@@ -0,0 +1,54 @@
---
title: Управление запланированными напоминаниями
intro: 'Напоминания можно получать в Slack, если у вас или вашей команды есть запросы на вытягивание, ожидающие проверки.'
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
redirect_from:
- /github/setting-up-and-managing-your-github-user-account/managing-your-scheduled-reminders
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders
shortTitle: Manage scheduled reminders
ms.openlocfilehash: 7dab3826b1791d3b06b3a2594c3ba132c6d675b4
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145165180'
---
## Сведения о запланированных напоминаниях для пользователей
Запланированные напоминания применяются для того, чтобы пользователи сосредоточились на наиболее важных запросах на проверку, требующих их внимания. Запланированные напоминания для запросов на вытягивание будут отправлять вам в Slack сообщение с открытыми запросами на вытягивание, которым требуется проверка в указанное время. Например, можно настроить запланированные напоминания для отправки в Slack каждое утро в 10:00 с помощью сообщений с запросами на вытягивание, которые необходимо проверить вам или одной из ваших команд.
Для определенных событий можно также включить оповещения в режиме реального времени для запланированных напоминаний. Оповещения в режиме реального времени отправляются в канал Slack, как только происходит важное событие, например при назначении проверки.
Можно задать запланированные напоминания для личных или командных запросов на проверку для запросов на вытягивание в организациях, членом которых вы являетесь. Прежде чем можно будет создавать запланированное напоминание для себя, владелец организации должен авторизовать рабочую область Slack. Дополнительные сведения см. в разделе [Управление запланированными напоминаниями для организации](/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization).
{% data reusables.reminders.scheduled-reminders-limitations %}
## Создание запланированных напоминаний для личной учетной записи
{% data reusables.user-settings.access_settings %} {% data reusables.reminders.scheduled-reminders %}
1. Рядом с организацией, для которой требуется запланировать напоминания, нажмите кнопку **Изменить**.
![Кнопка редактирования запланированных напоминаний](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.add-reminder %} {% data reusables.reminders.authorize-slack %} {% data reusables.reminders.days-dropdown %} {% data reusables.reminders.times-dropdowns %}
8. При необходимости, чтобы получать запланированные напоминания о назначенных вам проверках, выберите **Проверить назначенные вам запросы**.
![Флажок "Проверить назначенные вам запросы"](/assets/images/help/profile/scheduled-reminders-your-requests.png)
9. При необходимости, чтобы получать запланированные напоминания о проверках, назначенных команде, членом которой вы являетесь, выберите **Проверить назначенные вашей команде запросы**.
![Флажок для запросов проверки, назначенных команде](/assets/images/help/profile/scheduled-reminders-your-team-requests.png) {% data reusables.reminders.real-time-alerts %} ![Флажок для включения оповещений в режиме реального времени](/assets/images/help/settings/scheduled-reminders-real-time-alerts-personal.png) {% data reusables.reminders.create-reminder %}
## Управление запланированными напоминаниями для личной учетной записи
{% data reusables.user-settings.access_settings %} {% data reusables.reminders.scheduled-reminders %}
1. Рядом с организацией, для которой требуется внести изменения в запланированные напоминания, нажмите кнопку **Изменить**.
![Кнопка редактирования запланированных напоминаний](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.edit-page %} {% data reusables.reminders.update-buttons %}
## Удаление запланированных напоминаний для личной учетной записи
{% data reusables.user-settings.access_settings %} {% data reusables.reminders.scheduled-reminders %}
1. Рядом с организацией, для которой требуется удалить напоминания, нажмите кнопку **Изменить**.
![Кнопка редактирования запланированных напоминаний](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.delete %}
## Дополнительные материалы
- [Управление запланированными напоминаниями для организации](/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization)
- [Управление запланированными напоминаниями для команды](/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team)

View File

@@ -0,0 +1,35 @@
---
title: Публикация или скрытие сведений о членстве в организации
intro: 'Если вы хотите сообщить всем, к каким организациям вы принадлежите, вы можете настроить отображение аватаров организаций в вашем профиле.'
redirect_from:
- /articles/publicizing-or-concealing-organization-membership
- /articles/publicizing-or-hiding-organization-membership
- /github/setting-up-and-managing-your-github-user-account/publicizing-or-hiding-organization-membership
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Show or hide membership
ms.openlocfilehash: 89f9c7ee5cae6215412fd20dc0590f4f8dc5bf0b
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '147881182'
---
![Поле организаций в профиле](/assets/images/help/profile/profile_orgs_box.png)
## Настройка видимости сведений о членстве в организации
{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %}
4. Найдите свое имя пользователя в списке участников. В большом списке имя пользователя можно найти с помощью поля поиска.
![Поле поиска участников организации](/assets/images/help/organizations/member-search-box.png)
5. В меню справа от имени пользователя выберите новый параметр видимости:
- Чтобы публиковать сведения о членстве, выберите **Открытый**.
- Чтобы скрывать сведения о членстве, выберите **Закрытый**.
![Ссылка для настройки видимости участника организации](/assets/images/help/organizations/member-visibility-link.png)

View File

@@ -0,0 +1,34 @@
---
title: Removing yourself from an organization
intro: 'If you''re an outside collaborator or a member of an organization, you can leave the organization at any time.'
redirect_from:
- /articles/how-do-i-remove-myself-from-an-organization
- /articles/removing-yourself-from-an-organization
- /github/setting-up-and-managing-your-github-user-account/removing-yourself-from-an-organization
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/removing-yourself-from-an-organization
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Leave an organization
---
{% ifversion fpt or ghec %}
{% warning %}
**Warning:** If you're currently responsible for paying for {% data variables.product.product_name %} in your organization, removing yourself from the organization **does not** update the billing information on file for the organization. If you are currently responsible for billing, **you must** have another owner or billing manager for the organization [update the organization's payment method](/articles/adding-or-editing-a-payment-method).
For more information, see "[Transferring organization ownership](/articles/transferring-organization-ownership)."
{% endwarning %}
{% endif %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.organizations %}
3. Under "Organizations", find the organization you'd like to remove yourself from, then click **Leave**.
![Leave organization button with roles shown](/assets/images/help/organizations/context-leave-organization-with-roles-shown.png)

View File

@@ -0,0 +1,37 @@
---
title: Requesting organization approval for OAuth Apps
intro: 'Organization members and outside collaborators can request that an owner approve access to organization resources for {% data variables.product.prodname_oauth_apps %}.'
redirect_from:
- /articles/requesting-organization-approval-for-third-party-applications
- /articles/requesting-organization-approval-for-your-authorized-applications
- /articles/requesting-organization-approval-for-oauth-apps
- /github/setting-up-and-managing-your-github-user-account/requesting-organization-approval-for-oauth-apps
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Request OAuth App approval
---
## About requesting organization approval for an {% data variables.product.prodname_oauth_app %}
Organization members can always request owner approval for {% data variables.product.prodname_oauth_apps %} they'd like to use, and organization owners receive a notification of pending requests.{% ifversion limit-app-access-requests %} Outside collaborators can request owner approval for {% data variables.product.prodname_oauth_apps %} they'd like to use if integration access requests are enabled. For more information, see "[Limiting OAuth App and GitHub App access requests](/organizations/managing-organization-settings/limiting-oauth-app-and-github-app-access-requests)."{% endif %}
## Requesting organization approval for an {% data variables.product.prodname_oauth_app %} you've already authorized for your personal account
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.access_applications %}
{% data reusables.user-settings.access_authorized_oauth_apps %}
3. In the list of applications, click the name of the {% data variables.product.prodname_oauth_app %} you'd like to request access for.
![View application button](/assets/images/help/settings/settings-third-party-view-app.png)
4. Next to the organization you'd like the {% data variables.product.prodname_oauth_app %} to access, click **Request access**.
![Request access button](/assets/images/help/settings/settings-third-party-request-access.png)
5. After you review the information about requesting {% data variables.product.prodname_oauth_app %} access, click **Request approval from owners**.
![Request approval button](/assets/images/help/settings/oauth-access-request-approval.png)
## Further reading
- "[About {% data variables.product.prodname_oauth_app %} access restrictions](/articles/about-oauth-app-access-restrictions)"

View File

@@ -0,0 +1,68 @@
---
title: Просмотр ролей пользователей в организации
intro: 'Можно просмотреть список пользователей в организации и отфильтровать их по роли. Дополнительные сведения о ролях в организации см. в статье [Роли в организации](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization).'
permissions: Organization members can see people's roles in the organization.
redirect_from:
- /articles/viewing-people-s-roles-in-an-organization
- /articles/viewing-peoples-roles-in-an-organization
- /github/setting-up-and-managing-your-github-user-account/viewing-peoples-roles-in-an-organization
- /github/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: View people in an organization
ms.openlocfilehash: e0632ffeb394615b7b64ad55673b69fc738bca27
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/12/2022
ms.locfileid: '146179634'
---
## Просмотр ролей организации
{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %}
4. Вы увидите список пользователей в вашей организации. Чтобы отфильтровать список по определенной роли, щелкните **Роль** и выберите нужную роль.
![click-role](/assets/images/help/organizations/view-list-of-people-in-org-by-role.png)
{% ifversion fpt %}
Если в вашей организации используется {% data variables.product.prodname_ghe_cloud %}, вы также можете просматривать список владельцев предприятия, управляющих параметрами выставления счетов и политиками для всех организаций вашего предприятия. Дополнительные сведения см. в [документации по {% data variables.product.prodname_ghe_cloud %}](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization#view-enterprise-owners-and-their-roles-in-an-organization).
{% endif %}
{% ifversion enterprise-owners-visible-for-org-members %}
## Просмотр владельцев предприятия и их ролей в организации
Если ваша организация управляется корпоративной учетной записью, вы можете просматривать список владельцев предприятия, управляющих параметрами выставления счетов и политиками для всех организаций вашего предприятия. Дополнительные сведения о корпоративных учетных записях см. в разделе [Типы учетных записей {% data variables.product.prodname_dotcom %}](/get-started/learning-about-github/types-of-github-accounts).
Вы также можете проверить, имеет ли владелец предприятия определенную роль в организации. Владельцы предприятия могут быть также участниками организации, выполнять другую роль в организации или не иметь никакой связи с организацией.
{% note %}
**Примечание.** Если вы являетесь владельцем организации, вы также можете предложить владельцу предприятия ту или иную роль в организации. Если владелец предприятия примет приглашение, будет использоваться место или лицензия в организации из числа лицензий, доступных для вашего предприятия. Дополнительные сведения о том, как работает лицензирование, см. в разделе [Роли в организации](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner).
{% endnote %}
| **Роль в предприятии** | **Роль в организации** | **Доступ или влияние организации** |
|----|----|----|----|
| Владелец предприятия | Нет связи или официальной роли в организации | Не имеет доступа к содержимому или репозиториям организации, но управляет корпоративными параметрами и политиками, влияющими на вашу организацию. |
| Владелец предприятия | Владелец организации | Может настраивать параметры организации и управлять доступом к ресурсам организации с помощью команд и т. д. |
| Владелец предприятия | Участник организации | Имеет доступ к ресурсам и содержимому организации, включая репозитории, но не к параметрам организации. |
Инструкции по просмотру всех ролей в организации см. в разделе [Роли в организации](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization). {% ifversion custom-repository-roles %} Участник организации также может иметь настраиваемую роль в определенном репозитории. Дополнительные сведения см. в разделе [Управление настраиваемыми ролями репозитория для организации](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization).{% endif %}
Дополнительные сведения о роли владельца организации см. в разделе [Роли в организации](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner).
{% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.people %}
4. На левой боковой панели в разделе "Корпоративные разрешения" щелкните **Владельцы предприятия**.
![Снимок экрана: параметр "Владельцы предприятия" в боковом меню](/assets/images/help/organizations/enterprise-owners-sidebar.png)
5. Просмотрите список владельцев вашего предприятия. Если владелец предприятия также является участником вашей организации, вы сможете увидеть его роль в организации.
![Снимок экрана: список владельцев предприятия и их роли в организации](/assets/images/help/organizations/enterprise-owners-list-on-org-page.png)
{% endif %}

View File

@@ -0,0 +1,43 @@
---
title: Best practices for leaving your company
intro: 'If you use your account on {% data variables.product.product_name %} for both personal and work purposes, there are a few things to keep in mind when you leave your company or organization.'
redirect_from:
- /articles/best-practices-for-leaving-your-company
- /github/setting-up-and-managing-your-github-user-account/best-practices-for-leaving-your-company
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/best-practices-for-leaving-your-company
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Leaving your company
---
Before you leave your company, make sure you update the following information in your personal account:
- Unverify your company email address by [deleting it in your Email settings](/articles/changing-your-primary-email-address). You can then re-add it without verifying to keep any associated commits linked to your account.
- [Change your primary email address](/articles/changing-your-primary-email-address) from your company email to your personal email.
- [Verify your new primary email address](/articles/verifying-your-email-address).
- [Change your GitHub username](/articles/changing-your-github-username) to remove any references to your company or organization, if necessary.
- If you've enabled two-factor (2FA) authentication for your personal account, make sure that you (not your company) control the 2FA authentication method you have configured. For more information, see "[Configuring two-factor authentication](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)."
## Leaving organizations
If you've been working with repositories that belong to an organization, you'll want to [remove yourself as a member of the organization](/articles/removing-yourself-from-an-organization). Note that if you are the organization owner, you should first [transfer ownership of the organization](/articles/transferring-organization-ownership) to another person.
Unless you're using a {% data variables.enterprise.prodname_managed_user %}, you'll still be able to access your personal account, even after leaving the organization. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_emus %}]({% ifversion not ghec%}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}
## Removing professional associations with personal repositories
If you've been collaborating professionally with another person on repositories that belong to their personal account, you'll want to [remove yourself as a collaborator](/articles/removing-yourself-from-a-collaborator-s-repository) from those repositories.
- [Stop watching repositories](https://github.com/watching) related to your work. You won't want those notifications anymore!
- [Transfer repositories you own](/articles/how-to-transfer-a-repository) that others may need to continue working on after you leave.
- [Delete forks that belong to you](/articles/deleting-a-repository) that are related to the work you were doing. Don't worry, deleting a fork doesn't delete the upstream repository.
- Delete local copies of your forks that may exist on your computer:
```shell
$ rm -rf WORK_DIRECTORY
```

View File

@@ -0,0 +1,74 @@
---
title: Converting a user into an organization
redirect_from:
- /articles/what-is-the-difference-between-create-new-organization-and-turn-account-into-an-organization
- /articles/explaining-the-account-transformation-warning
- /articles/converting-a-user-into-an-organization
- /github/setting-up-and-managing-your-github-user-account/converting-a-user-into-an-organization
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/converting-a-user-into-an-organization
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/converting-a-user-into-an-organization
intro: You can convert your personal account into an organization. This allows more granular permissions for repositories that belong to the organization.
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
shortTitle: User into an organization
---
{% warning %}
**Warning**: Before converting a user into an organization, keep these points in mind.
* You will **no longer** be able to sign into the converted personal account.
* You will **no longer** be able to create or modify gists owned by the converted personal account.
* An organization **cannot** be converted back to a user.
* The SSH keys, OAuth tokens, job profile, reactions, and associated user information, **will not** be transferred to the organization. This is only true for the personal account that's being converted, not any of the personal account's collaborators.
* Any {% data variables.product.prodname_github_apps %} installed on the converted personal account will be uninstalled.
* Any commits made with the converted personal account **will no longer be linked** to that account. The commits themselves **will** remain intact.
* Any existing comments made by the converted personal account **will no longer be linked** to that account. The comments themselves **will** remain intact, but will be associated with the `ghost` user.
* Any forks of private repositories made with the converted personal account will be deleted.
{% endwarning %}
{% ifversion fpt or ghec or ghes %}
## Keep your personal account and create a new organization manually
If you want your organization to have the same name that you are currently using for your personal account, or if you want to keep your personal account's information intact, then you must create a new organization and transfer your repositories to it instead of converting your personal account into an organization.
1. To retain your current personal account name for your personal use, [change the name of your personal account](/articles/changing-your-github-username) to something new and wonderful.
2. [Create a new organization](/articles/creating-a-new-organization-from-scratch) with the original name of your personal account.
3. [Transfer your repositories](/articles/transferring-a-repository) to your new organization account.{% endif %}
## Convert your personal account into an organization automatically
You can also convert your personal account directly into an organization. Converting your account:
- Preserves the repositories as they are without the need to transfer them to another account manually
- Automatically invites collaborators to teams with permissions equivalent to what they had before
{% ifversion fpt or ghec %}- For personal accounts on {% data variables.product.prodname_pro %}, automatically transitions billing to [the paid {% data variables.product.prodname_team %}](/articles/about-billing-for-github-accounts) without the need to re-enter payment information, adjust your billing cycle, or double pay at any time{% endif %}
1. Create a new personal account, which you'll use to sign into GitHub and access the organization and your repositories after you convert.
2. [Leave any organizations](/articles/removing-yourself-from-an-organization) the personal account you're converting has joined.
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.organizations %}
5. Under "Transform account", click **Turn <username> into an organization**.
![Organization conversion button](/assets/images/help/settings/convert-to-organization.png)
6. In the Account Transformation Warning dialog box, review and confirm the conversion. Note that the information in this box is the same as the warning at the top of this article.
![Conversion warning](/assets/images/help/organizations/organization-account-transformation-warning.png)
7. On the "Transform your user into an organization" page, under "Choose an organization owner", choose either the secondary personal account you created in the previous section or another user you trust to manage the organization.
![Add organization owner page](/assets/images/help/organizations/organization-add-owner.png)
8. Choose your new organization's subscription and enter your billing information if prompted.
9. Click **Create Organization**.
10. Sign in to the new personal account you created in step one, then use the context switcher to access your new organization.
{% tip %}
**Tip**: When you convert a personal account into an organization, we'll add collaborators on repositories that belong to the account to the new organization as *outside collaborators*. You can then invite *outside collaborators* to become members of your new organization if you wish. For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)."
{% endtip %}
## Further reading
- "[Setting up teams](/articles/setting-up-teams)"
{% ifversion fpt or ghec %}- "[Inviting users to join your organization](/articles/inviting-users-to-join-your-organization)"{% endif %}
- "[Accessing an organization](/articles/accessing-an-organization)"

View File

@@ -0,0 +1,67 @@
---
title: Deleting your personal account
intro: 'You can delete your personal account on {% data variables.location.product_location %} at any time.'
redirect_from:
- /articles/deleting-a-user-account
- /articles/deleting-your-user-account
- /github/setting-up-and-managing-your-github-user-account/deleting-your-user-account
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/deleting-your-user-account
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account
versions:
fpt: '*'
ghes: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Delete your account
---
## About deletion of your personal account
Deleting your personal account removes all repositories, forks of private repositories, wikis, issues, pull requests, and pages owned by your account. {% ifversion fpt or ghec %}Issues and pull requests you've created and comments you've made in repositories owned by other users will not be deleted. Your resources and comments will become associated with the [ghost user](https://github.com/ghost).{% else %}Issues and pull requests you've created and comments you've made in repositories owned by other users will not be deleted.{% endif %}
{% ifversion ghec %}
{% note %}
**Note**: If your enterprise manages your account and you sign into {% data variables.location.product_location %} through your company's identity provider (IdP), you cannot delete your account. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)."
{% endnote %}
{% endif %}
{% ifversion fpt or ghec %}When you delete your account we stop billing you. The email address associated with the account becomes available for use with a different account on {% data variables.location.product_location %}. After 90 days, the account name also becomes available to anyone else to use on a new account. {% endif %}
If you're the only owner of an organization, you must transfer ownership to another person or delete the organization before you can delete your personal account. If there are other owners in the organization, you must remove yourself from the organization before you can delete your personal account.
For more information, see the following articles.
- "[Transferring organization ownership](/articles/transferring-organization-ownership)"
- "[Deleting an organization account](/articles/deleting-an-organization-account)"
- "[Removing yourself from an organization](/articles/removing-yourself-from-an-organization/)"
## Back up your account data
Before you delete your personal account, make a copy of all repositories, private forks, wikis, issues, and pull requests owned by your account. For more information, see "[Backing up a repository](/repositories/archiving-a-github-repository/backing-up-a-repository)."
{% warning %}
**Warning:** Once your personal account has been deleted, {% ifversion fpt or ghec %}{% data variables.product.company_short %}{% elsif ghes or ghae %}an enterprise owner{% endif %} cannot restore your content.
{% endwarning %}
## Delete your personal account
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.account_settings %}
3. At the bottom of the Account Settings page, under "Delete account", click **Delete your account**. Before you can delete your personal account:
- If you're the only owner in the organization, you must transfer ownership to another person or delete your organization.
- If there are other organization owners in the organization, you must remove yourself from the organization.
![Account deletion button](/assets/images/help/settings/settings-account-delete.png)
4. In the "Make sure you want to do this" dialog box, complete the steps to confirm you understand what happens when your account is deleted:
![Delete account confirmation dialog](/assets/images/help/settings/settings-account-deleteconfirm.png)
{% ifversion fpt or ghec %}- Recall that all repositories, forks of private repositories, wikis, issues, pull requests and {% data variables.product.prodname_pages %} sites owned by your account will be deleted and your billing will end immediately, and your username will be available to anyone for use on {% data variables.product.product_name %} after 90 days.
{% else %}- Recall that all repositories, forks of private repositories, wikis, issues, pull requests and pages owned by your account will be deleted, and your username will be available for use on {% data variables.product.product_name %}.
{% endif %}- In the first field, type your {% data variables.product.product_name %} username or email.
- In the second field, type the phrase from the prompt.

View File

@@ -0,0 +1,19 @@
---
title: Managing your personal account
intro: 'You can manage your personal account on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}. For example, you can {% ifversion fpt or ghec %}manage multiple accounts, {% endif %}convert an account to an organization{% ifversion fpt or ghec or ghes %}, or delete an account{% endif %}.'
shortTitle: Manage personal account
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Accounts
children:
- /managing-multiple-accounts
- /merging-multiple-personal-accounts
- /converting-a-user-into-an-organization
- /best-practices-for-leaving-your-company
- /deleting-your-personal-account
---

View File

@@ -0,0 +1,105 @@
---
title: Managing multiple accounts
intro: 'If you use one workstation to contribute to projects for more than one account on {% data variables.location.product_location %}, you can modify your Git configuration to simplify the contribution process.'
versions:
feature: multiple-accounts-one-workstation
topics:
- Accounts
- Git
- GitHub
shortTitle: Manage multiple accounts
---
## About management of multiple accounts
In some cases, you may need to use multiple accounts on {% data variables.location.product_location %}. For example, you may have a personal account for open source contributions, and your employer may also create and manage a user account for you within an enterprise.
You cannot use your {% data variables.enterprise.prodname_managed_user %} to contribute to public projects on {% data variables.location.product_location %}, so you must contribute to those resources using your personal account. For more information, see "[About {% data variables.product.prodname_emus %}]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-user-accounts){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% elsif ghec %}."{% endif %}
If you want to use one workstation to contribute from both accounts, you can simplify contribution with Git by using a mixture of protocols to access repository data, or by using credentials on a per-repository basis.
{% warning %}
**Warning**: Be mindful when you use one workstation to contribute to two separate accounts. Management of two or more accounts can increase the chance of mistakenly leaking internal code to the public.
{% endwarning %}
If you aren't required to use a {% data variables.enterprise.prodname_managed_user %}, {% data variables.product.company_short %} recommends that you use one personal account for all your work on {% data variables.location.product_location %}. With a single personal account, you can contribute to a combination of personal, open source, or professional projects using one identity. Other people can invite the account to contribute to both individual repositories and repositories owned by an organization, and the account can be a member of multiple organizations or enterprises.
## Contributing to two accounts using HTTPS and SSH
If you contribute with two accounts from one workstation, you can access repositories by using a different protocol and credentials for each account.
Git can use either the HTTPS or SSH protocol to access and update data in repositories on {% data variables.location.product_location %}. The protocol you use to clone a repository determines which credentials your workstation will use to authenticate when you access the repository. With this approach to account management, you store the credentials for one account to use for HTTPS connections and upload an SSH key to the other account to use for SSH connections.
You can find both the HTTPS or an SSH URLs for cloning a repository on {% data variables.product.product_name %}. For more information, see "[Cloning a repository](/repositories/creating-and-managing-repositories/cloning-a-repository)."
For more information about the use of SSH to access repositories on {% data variables.product.product_name %}, see "[Connecting to {% data variables.product.prodname_dotcom %} with SSH](/authentication/connecting-to-github-with-ssh)."
## Contributing to multiple accounts using HTTPS and {% data variables.product.pat_generic %}s
Alternatively, if you want to use the HTTPS protocol for both accounts, you can use different {% data variables.product.pat_generic %}s for each account by configuring Git to store different credentials for each repository.
{% mac %}
{% data reusables.git.open-terminal %}
{% data reusables.git.confirm-credential-manager %}
{% data reusables.git.clear-the-stored-credentials %}
{% data reusables.git.no-credential-manager %}
- If the output is `osxkeychain`, you're using the macOS keychain. To clear the credentials, enter the following command.
```shell{:copy}
git credential-osxkeychain erase https://github.com
```
{% data reusables.git.clear-stored-gcm-credentials %}
{% data reusables.git.cache-on-repository-path %}
{% data reusables.accounts.create-personal-access-tokens %}
{% data reusables.git.provide-credentials %}
{% endmac %}
{% windows %}
1. Open Git Bash.
{% data reusables.git.confirm-credential-manager %}
{% data reusables.git.clear-the-stored-credentials %}
{% data reusables.git.no-credential-manager %}
{% data reusables.git.clear-stored-gcm-credentials %}
- If the output is `wincred`, you're using the Windows Credential Manager. To clear the credentials, enter the following command.
```shell{:copy}
cmdkey /delete:LegacyGeneric:target=git:https://github.com
```
{% data reusables.git.cache-on-repository-path %}
{% data reusables.accounts.create-personal-access-tokens %}
{% data reusables.git.provide-credentials %}
{% endwindows %}
{% linux %}
{% data reusables.git.open-terminal %}
{% data reusables.git.confirm-credential-manager %}
{% data reusables.git.clear-the-stored-credentials %}
{% data reusables.git.no-credential-manager %}
{% data reusables.git.clear-stored-gcm-credentials %}
{% data reusables.git.cache-on-repository-path %}
{% data reusables.accounts.create-personal-access-tokens %}
{% data reusables.git.provide-credentials %}
{% endlinux %}
## Contributing to multiple accounts using SSH and `GIT_SSH_COMMAND`
If you want to use the SSH protocol for both accounts, you can use different SSH keys for each account. For more information about using SSH, see "[Connecting to {% data variables.product.prodname_dotcom %} with SSH](/authentication/connecting-to-github-with-ssh)."
To use a different SSH key for different repositories that you clone to your workstation, you must write a shell wrapper function for Git operations. The function should perform the following steps.
1. Determine the repository's full name with owner, using a command such as `git config --get remote.origin.url`.
2. Choose the correct SSH key for authentication.
3. Modify `GIT_SSH_COMMAND` accordingly. For more information about `GIT_SSH_COMMAND`, see [Environment Variables](https://git-scm.com/docs/git#Documentation/git.txt-codeGITSSHCOMMANDcode) in the Git documentation.
For example, the following command sets the `GIT_SSH_COMMAND` environment variable to specify an SSH command that uses the private key file at **_PATH/TO/KEY/FILE_** for authentication to clone the repository named **_OWNER_**/**_REPOSITORY_** on {% data variables.location.product_location %}.
<pre>
GIT_SSH_COMMAND='ssh -i <em>PATH/TO/KEY/FILE</em> -o IdentitiesOnly=yes' git clone git@github.com:<em>OWNER</em>/<em>REPOSITORY</em>
</pre>

View File

@@ -0,0 +1,54 @@
---
title: Объединение нескольких личных учетных записей
intro: 'Если у вас есть отдельные учетные записи для работы и личного использования, их можно объединить.'
redirect_from:
- /articles/can-i-merge-two-accounts
- /articles/keeping-work-and-personal-repositories-separate
- /articles/merging-multiple-user-accounts
- /github/setting-up-and-managing-your-github-user-account/merging-multiple-user-accounts
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/merging-multiple-user-accounts
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/merging-multiple-personal-accounts
versions:
fpt: '*'
ghec: '*'
topics:
- Accounts
shortTitle: Merge multiple accounts
ms.openlocfilehash: 39198c8fdd0078321774eac4180f84a2b039d25e
ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/09/2022
ms.locfileid: '147687242'
---
{% tip %}
{% ifversion ghec %}
**Совет.** {% data variables.product.prodname_emus %} позволяет организации подготавливать уникальные личные учетные записи для своих членов с помощью поставщика удостоверений (IdP). Дополнительные сведения см. в разделе [Сведения о пользователях, управляемых предприятием](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users). Для других вариантов использования рекомендуется применять только одну личную учетную запись для управления и личными, и профессиональными репозиториями.
{% else %}
**Совет.** Рекомендуется использовать только одну личную учетную запись для управления и личными, и профессиональными репозиториями.
{% endif %}
{% endtip %}
{% warning %}
**Внимание!**
- Разрешения на доступ к организации и репозиторию не переносятся между учетными записями. Если у удаляемой учетной записи есть существующее разрешение на доступ, владельцу организации или администратору репозитория потребуется пригласить учетную запись, которую вы хотите сохранить.
- Любые фиксации, созданные с помощью предоставленного GitHub адреса электронной почты `noreply`, нельзя передать из одной учетной записи в другую. Если учетная запись, которую вы хотите удалить, использовала параметр **Хранить мой адрес электронной почты в секрете**, будет невозможно перенести фиксации, созданные удаляемой учетной записью, в ту, которую вы хотите сохранить.
{% endwarning %}
1. [Перенесите все репозитории](/articles/how-to-transfer-a-repository) из учетной записи, которую вы хотите удалить, в ту, которую хотите сохранить. Также передаются проблемы, запросы на вытягивание и вики-сайты. Убедитесь, что репозитории существуют в учетной записи, которую вы хотите сохранить.
2. [Обновите удаленные URL-адреса](/github/getting-started-with-github/managing-remote-repositories) во всех локальных клонах перемещенных репозиториев.
3. [Удалите учетную запись](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/deleting-your-personal-account), которую вы больше не хотите использовать.
4. Чтобы добавить прошлые фиксации в новую учетную запись, добавьте адрес электронной почты, используемый для создания фиксаций, в сохраняемую учетную запись. Дополнительные сведения см. в разделе [Почему мои вклады не отображаются в моем профиле?](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)
## Дополнительные материалы
- [Типы учетных записей {% data variables.product.prodname_dotcom %}](/articles/types-of-github-accounts)

View File

@@ -0,0 +1,60 @@
---
title: About continuous integration
intro: 'You can create custom continuous integration (CI) workflows directly in your {% data variables.product.prodname_dotcom %} repository with {% data variables.product.prodname_actions %}.'
redirect_from:
- /articles/about-continuous-integration
- /github/automating-your-workflow-with-github-actions/about-continuous-integration
- /actions/automating-your-workflow-with-github-actions/about-continuous-integration
- /actions/building-and-testing-code-with-continuous-integration/about-continuous-integration
- /actions/guides/about-continuous-integration
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: overview
topics:
- CI
shortTitle: Continuous integration
---
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## About continuous integration
Continuous integration (CI) is a software practice that requires frequently committing code to a shared repository. Committing code more often detects errors sooner and reduces the amount of code a developer needs to debug when finding the source of an error. Frequent code updates also make it easier to merge changes from different members of a software development team. This is great for developers, who can spend more time writing code and less time debugging errors or resolving merge conflicts.
When you commit code to your repository, you can continuously build and test the code to make sure that the commit doesn't introduce errors. Your tests can include code linters (which check style formatting), security checks, code coverage, functional tests, and other custom checks.
Building and testing your code requires a server. You can build and test updates locally before pushing code to a repository, or you can use a CI server that checks for new code commits in a repository.
## About continuous integration using {% data variables.product.prodname_actions %}
{% ifversion ghae %}CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on runner systems that you host. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)."
{% else %} CI using {% data variables.product.prodname_actions %} offers workflows that can build the code in your repository and run your tests. Workflows can run on {% data variables.product.prodname_dotcom %}-hosted virtual machines, or on machines that you host yourself. For more information, see "[About {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners)" and "[About self-hosted runners](/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners)."
{% endif %}
You can configure your CI workflow to run when a {% data variables.product.prodname_dotcom %} event occurs (for example, when new code is pushed to your repository), on a set schedule, or when an external event occurs using the repository dispatch webhook.
{% data variables.product.product_name %} runs your CI tests and provides the results of each test in the pull request, so you can see whether the change in your branch introduces an error. When all CI tests in a workflow pass, the changes you pushed are ready to be reviewed by a team member or merged. When a test fails, one of your changes may have caused the failure.
When you set up CI in your repository, {% data variables.product.product_name %} analyzes the code in your repository and recommends CI workflows based on the language and framework in your repository. For example, if you use [Node.js](https://nodejs.org/en/), {% data variables.product.product_name %} will suggest a starter workflow that installs your Node.js packages and runs your tests. You can use the CI starter workflow suggested by {% data variables.product.product_name %}, customize the suggested starter workflow, or create your own custom workflow file to run your CI tests.
![Screenshot of suggested continuous integration starter workflows](/assets/images/help/repository/ci-with-actions-template-picker.png)
In addition to helping you set up CI workflows for your project, you can use {% data variables.product.prodname_actions %} to create workflows across the full software development life cycle. For example, you can use actions to deploy, package, or release your project. For more information, see "[About {% data variables.product.prodname_actions %}](/articles/about-github-actions)."
For a definition of common terms, see "[Core concepts for {% data variables.product.prodname_actions %}](/github/automating-your-workflow-with-github-actions/core-concepts-for-github-actions)."
## Starter workflow
{% data variables.product.product_name %} offers CI starter workflow for a variety of languages and frameworks.
Browse the complete list of CI starter workflow offered by {% data variables.product.company_short %} in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.location.product_location %}{% endif %}.
## Further reading
{% ifversion fpt or ghec %}
- "[Managing billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions)"
{% endif %}

View File

@@ -0,0 +1,219 @@
---
title: Создание и тестирование для Go
intro: Вы можете создать рабочий процесс непрерывной интеграции для сборки и тестирования проекта Go.
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
shortTitle: Build & test Go
ms.openlocfilehash: 590edc2af0b7f370e52b449f320bdc2a758450bc
ms.sourcegitcommit: 2e1852bcdd690cb66b9b5d69cb056a2bb2b9a6b4
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 11/10/2022
ms.locfileid: '148160858'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве описано, как создать, протестировать и опубликовать пакет Go.
{% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% else %} Размещенные в {% data variables.product.prodname_dotcom %} средства выполнения имеют кэш инструментов с предварительно установленным программным обеспечением, включающим в себя зависимости для Go. Полный список актуального программного обеспечения и предварительно установленных версий Go см. в разделе [Сведения о программном обеспечении, установленном в средствах выполнения, размещенных в {% data variables.product.prodname_dotcom %}](/actions/using-github-hosted-runners/about-github-hosted-runners#preinstalled-software).
{% endif %}
## Предварительные требования
Вы уже должны быть знакомы с синтаксисом YAML и его использованием с {% data variables.product.prodname_actions %}. Дополнительные сведения см. в статье [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/using-workflows/workflow-syntax-for-github-actions).
Рекомендуется иметь базовое представление о пакете SDK для языка Go. Дополнительные сведения см. в разделе [Приступая к работе с Go](https://golang.org/doc/tutorial/getting-started).
## Использование начального рабочего процесса Go
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Go, который должен работать для большинства проектов Go. В этом руководстве приведены примеры, которые можно использовать для настройки начального рабочего процесса. Дополнительные сведения см. в статье [Начальный рабочий процесс Go](https://github.com/actions/starter-workflows/blob/main/ci/go.yml).
Чтобы быстро приступить к работе, добавьте начальный рабочий процесс в каталог `.github/workflows` своего репозитория.
```yaml{:copy}
name: Go package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Go
uses: {% data reusables.actions.action-setup-go %}
with:
go-version: 1.15
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
```
## Указание версии Go
Самый простой способ указать версию Go заключается в использовании действия `setup-go`, предоставляемого {% data variables.product.prodname_dotcom %}. Дополнительные сведения см. в описании [действия `setup-go`](https://github.com/actions/setup-go/).
Чтобы использовать предустановленную версию Go для средства выполнения, размещенного в {% data variables.product.prodname_dotcom %}, передайте соответствующую версию свойству `go-version` действия `setup-go`. Это действие находит определенную версию Go из кэша инструментов в средстве выполнения и добавляет необходимые двоичные файлы в переменную `PATH`. Эти изменения будут сохранены для остальной части задания.
Действие `setup-go` представляет собой рекомендуемый способ использования Go с {% data variables.product.prodname_actions %}, так как помогает обеспечить согласованное поведение в разных средствах выполнения и различных версиях Go. При использовании локального средства выполнения необходимо установить Go и добавить его в `PATH`.
### Использование нескольких версий Go
```yaml{:copy}
name: Go
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.14', '1.15', '1.16.x' ]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup Go {% raw %}${{ matrix.go-version }}{% endraw %}
uses: {% data reusables.actions.action-setup-go %}
with:
go-version: {% raw %}${{ matrix.go-version }}{% endraw %}
# You can test your matrix by printing the current Go version
- name: Display Go version
run: go version
```
### Использование определенной версии Go
Вы можете настроить задание для использования конкретной версии Go, например `1.16.2`. Кроме того, можно использовать синтаксис семантической версии, чтобы получить последний дополнительный выпуск. В этом примере используется последнее исправление Go 1.16:
```yaml{:copy}
- name: Setup Go 1.16.x
uses: {% data reusables.actions.action-setup-go %}
with:
# Semantic version range syntax or exact version of Go
go-version: '1.16.x'
```
## Установка зависимостей
Можно использовать для `go get` установки зависимостей:
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup Go
uses: {% data reusables.actions.action-setup-go %}
with:
go-version: '1.16.x'
- name: Install dependencies
run: |
go get .
go get example.com/octo-examplemodule
go get example.com/octo-examplemodule@v1.3.4
```
{% ifversion actions-caching %}
### Кэширование зависимостей
Можно кэшировать и восстанавливать зависимости с помощью [действия`setup-go`](https://github.com/actions/setup-go). По умолчанию кэширование отключено, но вы можете задать параметр `cache` равным `true`, чтобы включить его.
Если кэширование включено, действие `setup-go` выполняет поиск файла зависимостей `go.sum` в корневом каталоге репозитория и использует хэш файла зависимостей в составе ключа кэша.
```yaml{:copy}
- name: Setup Go
uses: {% data reusables.actions.action-setup-go %}
with:
go-version: '1.16.x'
cache: true
```
Кроме того, можно использовать параметр `cache-dependency-path` для случаев использования нескольких файлов зависимостей или их расположения в разных подкаталогах.
```yaml{:copy}
- uses: {% data reusables.actions.action-setup-go %}
with:
go-version: '1.17'
cache: true
cache-dependency-path: subdir/go.sum
```
Если у вас есть особые требования или вам нужно управлять кэшированием более детально, можно использовать [действие `cache`](https://github.com/marketplace/actions/cache). Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/using-workflows/caching-dependencies-to-speed-up-workflows).
{% endif %}
## Создание и тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде. В этом примере рабочего процесса показано, как использовать `go build` и `go test` в задании:
```yaml{:copy}
name: Go
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup Go
uses: {% data reusables.actions.action-setup-go %}
with:
go-version: '1.16.x'
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test
```
## Упаковка данных рабочего процесса в виде артефактов
После завершения рабочего процесса можно отправить полученные артефакты для анализа. Например, может потребоваться сохранить файлы журналов, основные дампы, результаты теста или снимки экрана. В следующем примере показано, как использовать действие `upload-artifact` для отправки результатов теста.
Дополнительные сведения см. в разделе [Хранение данных рабочего процесса в качестве артефактов](/actions/using-workflows/storing-workflow-data-as-artifacts).
```yaml{:copy}
name: Upload Go test results
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.14', '1.15', '1.16.x' ]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup Go
uses: {% data reusables.actions.action-setup-go %}
with:
go-version: {% raw %}${{ matrix.go-version }}{% endraw %}
- name: Install dependencies
run: go get .
- name: Test with Go
run: go test -json > TestResults-{% raw %}${{ matrix.go-version }}{% endraw %}.json
- name: Upload Go test results
uses: {% data reusables.actions.action-upload-artifact %}
with:
name: Go-results-{% raw %}${{ matrix.go-version }}{% endraw %}
path: TestResults-{% raw %}${{ matrix.go-version }}{% endraw %}.json
```

View File

@@ -0,0 +1,122 @@
---
title: Сборка и тестирование Java с помощью Ant
intro: Рабочий процесс непрерывной интеграции (CI) можно создать в GitHub Actions для сборки и тестирования проекта Java с помощью Ant.
redirect_from:
- /actions/language-and-framework-guides/building-and-testing-java-with-ant
- /actions/guides/building-and-testing-java-with-ant
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Java
- Ant
shortTitle: Build & test Java & Ant
ms.openlocfilehash: d1e73fdce7bf23bf1b86ec3eb4d0f8acd9b6d292
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145088733'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве показано, как создать рабочий процесс, который выполняет непрерывную интеграцию (CI) для вашего проекта Java с помощью системы сборки Ant. Создаваемый рабочий процесс позволит увидеть, когда фиксации в запросе на вытягивание вызывают сбои в сборке или тестировании ветви по умолчанию; этот подход поможет убедиться, что ваш код всегда работоспособен. Можно расширить рабочий процесс CI, чтобы передать артефакты через выполнение рабочего процесса.
Средства выполнения, размещенные на {% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% else %} {% data variables.product.prodname_dotcom %}, имеют кэш средств с предварительно установленным программным обеспечением, включающим в себя комплекты SDK для Java (JDK) и Ant. Список программного обеспечения и предварительно установленных версий JDK и Ant см. в разделе [Спецификации для средств выполнения, размещенных в {% data variables.product.prodname_dotcom %}](/actions/reference/specifications-for-github-hosted-runners/#supported-software).
{% endif %}
## Предварительные требования
Требуются знания YAML и синтаксиса {% data variables.product.prodname_actions %}. Дополнительные сведения см. в разделе:
- [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions)
- «[Сведения о {% data variables.product.prodname_actions %}](/actions/learn-github-actions
Рекомендуется иметь базовое представление о Java и платформе Ant. Дополнительные сведения см. в [руководстве по Apache Ant](https://ant.apache.org/manual/).
{% data reusables.actions.enterprise-setup-prereq %}
## Использование начального рабочего процесса Ant
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Ant, который будет работать для большинства проектов Java на базе Ant. Дополнительные сведения см. в разделе [Начальный рабочий процесс Ant](https://github.com/actions/starter-workflows/blob/main/ci/ant.yml).
Чтобы быстро приступить к работе, при создании нового рабочего процесса можно выбрать предварительно настроенный начальный рабочий процесс Ant. Дополнительные сведения см. в разделе [Краткое руководство по {% data variables.product.prodname_actions %}](/actions/quickstart).
Этот рабочий процесс также можно добавить вручную, создав новый файл в каталоге `.github/workflows` репозитория.
```yaml{:copy}
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up JDK 11
uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Ant
run: ant -noinput -buildfile build.xml
```
Этот рабочий процесс выполняет следующие действия:
1. На шаге `checkout` в средство выполнения скачивается копия репозитория.
2. На шаге `setup-java` происходит настройка JDK 11 Java с помощью Adoptium.
3. На шаге "Сборка с помощью Ant" целевой объект по умолчанию запускается в `build.xml` в неинтерактивном режиме.
Начальные рабочие процессы по умолчанию — это отличные отправные точки при создании рабочего процесса сборки и тестирования, а также начальный рабочий процесс можно настроить в соответствии с потребностями проекта.
{% data reusables.actions.example-github-runner %}
{% data reusables.actions.java-jvm-architecture %}
## Создание и тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде.
Начальный рабочий процесс выполнит целевой объект по умолчанию, указанный в вашем файле _build.xml_. Целевой объект по умолчанию обычно будет настроен на сборку классов, выполнение тестов и классов пакетов в их распространяемом формате, например файл JAR.
Если вы используете разные команды для сборки проекта или хотите выполнить другой целевой объект, это можно указать. Например, может понадобиться выполнить целевой объект `jar`, настроенный в файле `_build-ci.xml_`.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- name: Run the Ant jar target
run: ant -noinput -buildfile build-ci.xml jar
```
## Упаковка данных рабочего процесса в виде артефактов
После успешной сборки и прохождения тестов может потребоваться передать полученные пакеты Java в виде артефакта сборки. Полученные пакеты будут храниться как часть выполнения рабочего процесса и их можно будет скачать. Артефакты помогут вам протестировать и отладить запросы на вытягивание в локальной среде до их слияния. Дополнительные сведения см. в разделе [Сохранение данных рабочего процесса с помощью артефактов](/actions/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts).
Как правило, Ant создает выходные файлы, такие как JAR, EAR или WAR, в каталоге `build/jar`. Содержимое этого каталога можно передать с помощью действия `upload-artifact`.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- run: ant -noinput -buildfile build.xml
- uses: {% data reusables.actions.action-upload-artifact %}
with:
name: Package
path: build/jar
```

View File

@@ -0,0 +1,149 @@
---
title: Сборка и тестирование в Java с помощью Gradle
intro: Рабочий процесс непрерывной интеграции (CI) можно создать в GitHub Actions для сборки и тестирования проекта Java с помощью Gradle.
redirect_from:
- /actions/language-and-framework-guides/building-and-testing-java-with-gradle
- /actions/guides/building-and-testing-java-with-gradle
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Java
- Gradle
shortTitle: Build & test Java & Gradle
ms.openlocfilehash: 00fa6888a45dda090df51260795717bc994be022
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: '147410446'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве показано, как создать рабочий процесс, который выполняет непрерывную интеграцию (CI) для вашего проекта Java с помощью системы сборки Gradle. Создаваемый рабочий процесс позволит увидеть, когда фиксации в запросе на вытягивание вызывают сбои в сборке или тестировании ветви по умолчанию; этот подход поможет убедиться, что ваш код всегда работоспособен. Вы можете расширить рабочий процесс CI, чтобы {% ifversion actions-caching %}кэшировать файлы и{% endif %} передавать артефакты через выполнение рабочего процесса.
{% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% else %} Средства выполнения, размещенные на {% data variables.product.prodname_dotcom %}, имеют кэш средств с предварительно установленным программным обеспечением, включающим в себя комплекты SDK для Java (JDK) и Gradle. Список программного обеспечения и предварительно установленных версий JDK и Gradle см. в разделе [Спецификации для средств выполнения, размещенных на {% data variables.product.prodname_dotcom %}](/actions/reference/specifications-for-github-hosted-runners/#supported-software).
{% endif %}
## Предварительные требования
Требуются знания YAML и синтаксиса {% data variables.product.prodname_actions %}. Дополнительные сведения см. в разделе:
- [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions)
- «[Сведения о {% data variables.product.prodname_actions %}](/actions/learn-github-actions
Рекомендуется иметь базовое представление о Java и платформе Gradle. Дополнительные сведения см. в разделе [Приступая к работе](https://docs.gradle.org/current/userguide/getting_started.html) документации по Gradle.
{% data reusables.actions.enterprise-setup-prereq %}
## Использование начального рабочего процесса Gradle
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Gradle, который будет работать для большинства проектов Java на базе Gradle. Дополнительные сведения см. в разделе [Начальный рабочий процесс Gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml).
Чтобы быстро приступить к работе, при создании рабочего процесса можно выбрать предварительно настроенный начальный рабочий процесс Gradle. Дополнительные сведения см. в [кратком руководстве по {% data variables.product.prodname_actions %}](/actions/quickstart).
Этот рабочий процесс также можно добавить вручную, создав новый файл в каталоге `.github/workflows` репозитория.
```yaml{:copy}
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up JDK 11
uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
```
Этот рабочий процесс выполняет следующие действия:
1. На шаге `checkout` в средство выполнения скачивается копия репозитория.
2. На шаге `setup-java` происходит настройка JDK 11 Java от Adoptium.
3. На шаге "Проверка программы-оболочки Gradle" проверяются контрольные суммы JAR-файлов программы-оболочки Gradle, имеющихся в исходном дереве.
4. На шаге "Сборка с помощью Gradle" выполняется сборка с помощью действия `gradle/gradle-build-action`, предоставленного организацией Gradle на {% data variables.product.prodname_dotcom %}. Это действие отвечает за вызов Gradle, сбор результатов и кэширование состояния между заданиями. Дополнительные сведения см. на веб-сайте [`gradle/gradle-build-action`](https://github.com/gradle/gradle-build-action).
Начальные рабочие процессы по умолчанию — это отличные отправные точки при создании рабочего процесса сборки и тестирования, а также начальный рабочий процесс можно настроить в соответствии с потребностями проекта.
{% data reusables.actions.example-github-runner %}
{% data reusables.actions.java-jvm-architecture %}
## Создание и тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде.
Начальный рабочий процесс будет по умолчанию запускать задачу `build`. В конфигурации Gradle по умолчанию эта команда скачивает зависимости, выполняет сборку классов, проводит тесты и упаковывает классы в распространяемый формат, например в JAR-файл.
Если вы используете другие команды для сборки проекта или хотите выполнить другую задачу, это можно указать. Например, может понадобиться выполнить задачу `package`, настроенную в файле _ci.gradle_.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Run the Gradle package task
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: -b ci.gradle package
```
{% ifversion actions-caching %}
## Кэширование зависимостей
Зависимости сборки можно кэшировать, чтобы ускорить выполнение рабочего процесса. После успешного выполнения `gradle/gradle-build-action` кэширует важные части домашнего каталога пользователя Gradle. При последующих запусках заданий данные из кэша восстанавливаются, так что скрипты сборки не нужно перекомпилировать, а зависимости не нужно скачивать из удаленных репозиториев пакетов.
При использовании действия `gradle/gradle-build-action` кэширование включено по умолчанию. Дополнительные сведения см. на веб-сайте [`gradle/gradle-build-action`](https://github.com/gradle/gradle-build-action#caching).
{% endif %}
## Упаковка данных рабочего процесса в виде артефактов
После успешной сборки и прохождения тестов может потребоваться передать полученные пакеты Java в виде артефакта сборки. Полученные пакеты будут храниться как часть выполнения рабочего процесса и их можно будет скачать. Артефакты помогут вам протестировать и отладить запросы на вытягивание в локальной среде до их слияния. Дополнительные сведения см. в разделе [Сохранение данных рабочего процесса с помощью артефактов](/actions/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts).
Как правило, Gradle создает выходные файлы, такие как JAR, EAR или WAR, в каталоге `build/libs`. Содержимое этого каталога можно передать с помощью действия `upload-artifact`.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
- uses: {% data reusables.actions.action-upload-artifact %}
with:
name: Package
path: build/libs
```

View File

@@ -0,0 +1,145 @@
---
title: Сборка и тестирование в Java с помощью Maven
intro: Рабочий процесс непрерывной интеграции (CI) можно создать в GitHub Actions для сборки и тестирования проекта Java с помощью Maven.
redirect_from:
- /actions/language-and-framework-guides/building-and-testing-java-with-maven
- /actions/guides/building-and-testing-java-with-maven
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Java
- Maven
shortTitle: Build & test Java with Maven
ms.openlocfilehash: 59d8961a7fdd1d8b84a05b8762bb09be3d2ab01c
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '146179810'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве показано, как создать рабочий процесс, который выполняет непрерывную интеграцию (CI) для вашего проекта Java с помощью средства управления проектами программного обеспечения Maven. Создаваемый рабочий процесс позволит увидеть, когда фиксации в запросе на вытягивание вызывают сбои в сборке или тестировании ветви по умолчанию; этот подход поможет убедиться, что ваш код всегда работоспособен. Вы можете расширить рабочий процесс CI, чтобы {% ifversion actions-caching %}кэшировать файлы и{% endif %} передавать артефакты через выполнение рабочего процесса.
Средства выполнения, размещенные на {% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% else %} {% data variables.product.prodname_dotcom %}, имеют кэш средств с предварительно установленным программным обеспечением, включающим в себя комплекты SDK для Java (JDK) и Maven. Список программного обеспечения и предварительно установленных версий JDK и Maven см. в разделе [Спецификации для средств выполнения, размещенных на {% data variables.product.prodname_dotcom %}](/actions/reference/specifications-for-github-hosted-runners/#supported-software).
{% endif %}
## Предварительные требования
Требуются знания YAML и синтаксиса {% data variables.product.prodname_actions %}. Дополнительные сведения см. в разделе:
- [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions)
- «[Сведения о {% data variables.product.prodname_actions %}](/actions/learn-github-actions
Рекомендуется иметь базовое представление о Java и платформе Maven. Дополнительные сведения см. в [руководстве по началу работы с Maven](http://maven.apache.org/guides/getting-started/index.html) в документации Maven.
{% data reusables.actions.enterprise-setup-prereq %}
## Использование начального рабочего процесса Maven
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Maven, который будет работать для большинства проектов Java на базе Maven. Дополнительные сведения см. в разделе [Начальный рабочий процесс Maven](https://github.com/actions/starter-workflows/blob/main/ci/maven.yml).
Чтобы быстро приступить к работе, при создании рабочего процесса можно выбрать предварительно настроенный начальный рабочий процесс Maven. Дополнительные сведения см. в [кратком руководстве по {% data variables.product.prodname_actions %}](/actions/quickstart).
Этот рабочий процесс также можно добавить вручную, создав новый файл в каталоге `.github/workflows` репозитория.
```yaml{:copy}
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up JDK 11
uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots package
```
Этот рабочий процесс выполняет следующие действия:
1. На шаге `checkout` в средство выполнения скачивается копия репозитория.
2. На шаге `setup-java` происходит настройка JDK 11 Java от Adoptium.
3. На шаге "Сборка с помощью Maven" целевой объект Maven `package` запускается в неинтерактивном режиме для проверки того, что сборка кода выполняется, тесты завершаются удачно и пакет можно создать.
Начальные рабочие процессы по умолчанию — это отличные отправные точки при создании рабочего процесса сборки и тестирования, а также начальный рабочий процесс можно настроить в соответствии с потребностями проекта.
{% data reusables.actions.example-github-runner %}
{% data reusables.actions.java-jvm-architecture %}
## Создание и тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде.
Начальный рабочий процесс будет по умолчанию запускать целевой объект `package`. В конфигурации Maven по умолчанию эта команда скачивает зависимости, выполняет сборку классов, проводит тесты и упаковывает классы в распространяемый формат, например в JAR-файл.
Если вы используете другие команды для сборки проекта или хотите выполнить другой целевой объект, это можно указать. Например, может понадобиться выполнить целевой объект `verify`, настроенный в файле _pom-ci.xml_.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- name: Run the Maven verify phase
run: mvn --batch-mode --update-snapshots verify
```
{% ifversion actions-caching %}
## Кэширование зависимостей
Вы можете кэшировать зависимости, чтобы ускорить выполнение рабочего процесса. После успешного выполнения локальный репозиторий Maven будет храниться в кэше. При последующих запусках рабочего процесса данные из кэша восстанавливаются, так что зависимости не нужно скачивать из удаленных репозиториев Maven. Кэшировать зависимости можно просто с помощью [действия `setup-java`](https://github.com/marketplace/actions/setup-java-jdk), либо можно использовать [действие `cache`](https://github.com/actions/cache) для более сложной настройки.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up JDK 11
uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
```
Этот рабочий процесс сохраняет содержимое локального репозитория Maven, расположенного в каталоге `.m2` домашнего каталога средства выполнения. Ключом кэша будет хэш содержимого файла _pom.xml_, поэтому изменения в файле _pom.xml_ делают кэш недействительным.
{% endif %}
## Упаковка данных рабочего процесса в виде артефактов
После успешной сборки и прохождения тестов может потребоваться передать полученные пакеты Java в виде артефакта сборки. Полученные пакеты будут храниться как часть выполнения рабочего процесса и их можно будет скачать. Артефакты помогут вам протестировать и отладить запросы на вытягивание в локальной среде до их слияния. Дополнительные сведения см. в разделе [Сохранение данных рабочего процесса с помощью артефактов](/actions/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts).
Как правило, Maven создает выходные файлы, такие как JAR, EAR или WAR, в каталоге `target`. Чтобы передать их как артефакты, их можно скопировать в новый каталог, содержащий артефакты для отправки. Например, можно создать каталог с именем `staging`. Затем содержимое этого каталога можно передать с помощью действия `upload-artifact`.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-java %}
with:
java-version: '11'
distribution: 'adopt'
- run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging
- uses: {% data reusables.actions.action-upload-artifact %}
with:
name: Package
path: staging
```

View File

@@ -0,0 +1,247 @@
---
title: Создание и тестирование для .NET
intro: Можно создать рабочий процесс непрерывной интеграции (CI) для сборки и тестирования проекта .NET.
redirect_from:
- /actions/guides/building-and-testing-net
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
shortTitle: Build & test .NET
ms.openlocfilehash: eadb00516976159f2efffcaa04cb4b46471c527f
ms.sourcegitcommit: 1309b46201604c190c63bfee47dce559003899bf
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: '147063621'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве описано, как создать, протестировать и опубликовать пакет .NET.
{% ifversion ghae %} Чтобы создать и протестировать проект .NET на платформе {% data variables.product.prodname_ghe_managed %}, требуется пакет SDK для .NET Core. {% data reusables.actions.self-hosted-runners-software %} {% else %} Размещенные в {% data variables.product.prodname_dotcom %} средства выполнения имеют кэш инструментов с предварительно установленным программным обеспечением, включающим в себя пакет SDK для .NET Core. Полный список актуального программного обеспечения и предварительно установленных версий пакета SDK для .NET Core см. в разделе [Программное обеспечение, установленное в средствах выполнения, размещенных в {% data variables.product.prodname_dotcom %}](/actions/reference/specifications-for-github-hosted-runners).
{% endif %}
## Предварительные требования
Вы уже должны быть знакомы с синтаксисом YAML и его использованием с {% data variables.product.prodname_actions %}. Дополнительные сведения см. в статье [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions).
Рекомендуется иметь базовое представление о пакете SDK для .NET Core. Дополнительные сведения см. в разделе [Приступая к работе с .NET](https://dotnet.microsoft.com/learn).
## Использование начального рабочего процесса .NET
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс .NET, который должен работать для большинства проектов .NET. В этом руководстве приведены примеры настройки начального рабочего процесса. Дополнительные сведения см. в разделе [Начальный рабочий процесс .NET](https://github.com/actions/setup-dotnet).
Чтобы быстро приступить к работе, добавьте начальный рабочий процесс в каталог `.github/workflows` своего репозитория.
```yaml
name: dotnet package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['3.0', '3.1.x', '5.0.x' ]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup .NET Core SDK {% raw %}${{ matrix.dotnet-version }}{% endraw %}
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: {% raw %}${{ matrix.dotnet-version }}{% endraw %}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
```
## Указание версии .NET
Чтобы использовать предустановленную версию пакета SDK для .NET Core в размещенном в {% data variables.product.prodname_dotcom %} средстве выполнения, используйте действие `setup-dotnet`. Это действие находит определенную версию .NET из кэша инструментов в средстве выполнения и добавляет необходимые двоичные файлы в переменную `PATH`. Эти изменения будут сохранены для остальной части задания.
Действие `setup-dotnet` представляет собой рекомендуемый способ использования .NET с {% data variables.product.prodname_actions %}, так как он обеспечивает согласованное поведение в разных средствах выполнения и различных версиях .NET. При использовании локального средства выполнения необходимо установить .NET и добавить его в `PATH`. Дополнительные сведения см. в описании действия [`setup-dotnet`](https://github.com/marketplace/actions/setup-net-core-sdk).
### Использование нескольких версий .NET
```yaml
name: dotnet package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '3.0', '3.1.x', '5.0.x' ]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup dotnet {% raw %}${{ matrix.dotnet-version }}{% endraw %}
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: {% raw %}${{ matrix.dotnet-version }}{% endraw %}
# You can test your matrix by printing the current dotnet version
- name: Display dotnet version
run: dotnet --version
```
### Использование определенной версии .NET
Вы можете настроить задание для использования конкретной версии .NET, например `3.1.3`. Кроме того, можно использовать синтаксис семантической версии, чтобы получить последний дополнительный выпуск. В этом примере используется последний дополнительный выпуск .NET 3.
```yaml
- name: Setup .NET 3.x
uses: {% data reusables.actions.action-setup-dotnet %}
with:
# Semantic version range syntax or exact version of a dotnet version
dotnet-version: '3.x'
```
## Установка зависимостей
Для размещенных в {% data variables.product.prodname_dotcom %} средств выполнения установлен диспетчер пакетов NuGet. Вы можете использовать CLI .NET для установки зависимостей из реестра пакетов NuGet перед сборкой и тестированием кода. Например, приведенный ниже код YAML устанавливает пакет `Newtonsoft`.
```yaml
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup dotnet
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: '3.1.x'
- name: Install dependencies
run: dotnet add package Newtonsoft.Json --version 12.0.1
```
{% ifversion actions-caching %}
### Кэширование зависимостей
Зависимости NuGet можно кэшировать с помощью уникального ключа, что позволяет восстановить зависимости для будущих рабочих процессов посредством действия [`cache`](https://github.com/marketplace/actions/cache). Например, приведенный ниже код YAML устанавливает пакет `Newtonsoft`.
Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/guides/caching-dependencies-to-speed-up-workflows).
```yaml
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup dotnet
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: '3.1.x'
- uses: {% data reusables.actions.action-cache %}
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: {% raw %}${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget{% endraw %}
- name: Install dependencies
run: dotnet add package Newtonsoft.Json --version 12.0.1
```
{% note %}
**Примечание**. В зависимости от количества зависимостей может быть быстрее использовать кэш зависимостей. Проекты с большим количеством крупных зависимостей должны выигрывать в производительности из-за сокращения времени скачивания. Проекты с меньшим количеством зависимостей могут не получать значительного выигрыша в производительности, либо производительность может даже немного снижаться из-за того, как NuGet устанавливает кэшированные зависимости. Производительность варьируется от проекта к проекту.
{% endnote %}
{% endif %}
## Создание и тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде. В этом примере показано, как использовать `dotnet build` и `dotnet test` в задании:
```yaml
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup dotnet
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: '3.1.x'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Test with the dotnet CLI
run: dotnet test
```
## Упаковка данных рабочего процесса в виде артефактов
После завершения рабочего процесса можно отправить полученные артефакты для анализа. Например, может потребоваться сохранить файлы журналов, основные дампы, результаты теста или снимки экрана. В следующем примере показано, как использовать действие `upload-artifact` для отправки результатов теста.
Дополнительные сведения см. в разделе [Сохранение данных рабочего процесса с помощью артефактов](/github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts).
```yaml
name: dotnet package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '3.0', '3.1.x', '5.0.x' ]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup dotnet
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: {% raw %}${{ matrix.dotnet-version }}{% endraw %}
- name: Install dependencies
run: dotnet restore
- name: Test with dotnet
run: dotnet test --logger trx --results-directory {% raw %}"TestResults-${{ matrix.dotnet-version }}"{% endraw %}
- name: Upload dotnet test results
uses: {% data reusables.actions.action-upload-artifact %}
with:
name: {% raw %}dotnet-results-${{ matrix.dotnet-version }}{% endraw %}
path: {% raw %}TestResults-${{ matrix.dotnet-version }}{% endraw %}
# Use always() to always run this step to publish test results when there are test failures
if: {% raw %}${{ always() }}{% endraw %}
```
## Публикация в реестрах пакетов
Вы можете настроить рабочий процесс для публикации пакета .NET в реестре пакетов после прохождения тестов CI. Вы можете использовать секреты репозитория для хранения любых токенов или учетных данных, необходимых для публикации двоичного файла. В следующем примере пакет создается и публикуется в {% data variables.product.prodname_registry %} с помощью `dotnet core cli`.
```yaml
name: Upload dotnet package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: '3.1.x' # SDK Version to use.
source-url: https://nuget.pkg.github.com/<owner>/index.json
env:
NUGET_AUTH_TOKEN: {% raw %}${{secrets.GITHUB_TOKEN}}{% endraw %}
- run: dotnet build --configuration Release <my project>
- name: Create the package
run: dotnet pack --configuration Release <my project>
- name: Publish the package to GPR
run: dotnet nuget push <my project>/bin/Release/*.nupkg
```

View File

@@ -0,0 +1,310 @@
---
title: Создание и тестирование для Node.js
intro: Вы можете создать рабочий процесс непрерывной интеграции для сборки и тестирования проекта Node.js.
redirect_from:
- /actions/automating-your-workflow-with-github-actions/using-nodejs-with-github-actions
- /actions/language-and-framework-guides/using-nodejs-with-github-actions
- /actions/guides/building-and-testing-nodejs
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Node
- JavaScript
shortTitle: Build & test Node.js
ms.openlocfilehash: 25e44f1454387a84dd198ea9998d1ebc2f94cfe7
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '146179026'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве показано, как получить рабочий процесс непрерывной интеграции (CI), который создает и тестирует код Node.js. Если тесты CI проходят правильно, может потребоваться развернуть код или опубликовать пакет.
## Предварительные требования
Рекомендуется иметь базовое представление о Node.js, YAML, параметрах конфигурации рабочих процессов, а также о том, как создавать файл рабочего процесса. Дополнительные сведения можно найти в разделе
- «[Сведения о {% data variables.product.prodname_actions %}](/actions/learn-github-actions
- [Начало работы с Node.js](https://nodejs.org/en/docs/guides/getting-started-guide/)
{% data reusables.actions.enterprise-setup-prereq %}
## Использование начального рабочего процесса Node.js
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Node.js, который будет работать для большинства проектов Node.js. В этом руководстве приведены примеры npm и Yarn, которые можно использовать для настройки начального рабочего процесса. Дополнительные сведения см. в разделе [Начальный рабочий процесс Node.js](https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml).
Чтобы быстро приступить к работе, добавьте начальный рабочий процесс в каталог `.github/workflows` своего репозитория. В показанном ниже рабочем процессе предполагается, что ветвью по умолчанию для вашего репозитория является `main`.
```yaml{:copy}
name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js {% raw %}${{ matrix.node-version }}{% endraw %}
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: {% raw %}${{ matrix.node-version }}{% endraw %}
- run: npm ci
- run: npm run build --if-present
- run: npm test
```
{% data reusables.actions.example-github-runner %}
## Указание версии Node.js
Самый простой способ указать версию Node.js заключается в использовании действия `setup-node`, предоставляемого {% data variables.product.prodname_dotcom %}. Дополнительные сведения см. описании [`setup-node`](https://github.com/actions/setup-node/).
Действие `setup-node` принимает версию Node.js в качестве входных данных и настраивает ее в средстве выполнения. Действие `setup-node` находит определенную версию Node.js из кэша инструментов в каждом средстве запуска и добавляет необходимые двоичные файлы в переменную `PATH`, которая сохраняется до конца задания. Применение действия `setup-node` представляет собой рекомендуемый способ использования Node.js с {% data variables.product.prodname_actions %}, так как он обеспечивает согласованное поведение в разных средствах выполнения и различных версиях Node.js. При использовании локального средства выполнения необходимо установить Node.js и добавить его в `PATH`.
Начальный рабочий процесс включает в себя матричную стратегию, которая создает и тестирует код с использованием четырех версий Node.js: 10.x, 12.x, 14.x и 15.x. Здесь "x" — это подстановочный знак, соответствующий последнему дополнительному выпуску и выпуску исправлений, доступному для версии. Каждая версия Node.js, указанная в массиве `node-version`, создает задание, которое выполняет одни и те же действия.
Каждое задание может получить доступ к значению, определенному в массиве `node-version` матрицы, с помощью контекста `matrix`. Действие `setup-node` использует контекст в качестве входных данных `node-version`. Действие `setup-node` настраивает каждое задание с использованием разных версий Node.js перед созданием и тестированием кода. Дополнительные сведения о матричных стратегиях и контекстах см. в разделах [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix) и [Контексты](/actions/learn-github-actions/contexts).
```yaml{:copy}
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js {% raw %}${{ matrix.node-version }}{% endraw %}
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: {% raw %}${{ matrix.node-version }}{% endraw %}
```
Кроме того, можно создавать и тестировать код с использованием конкретных версий Node.js.
```yaml{:copy}
strategy:
matrix:
node-version: [8.16.2, 10.17.0]
```
Либо можно создавать и тестировать код с помощью одной версии Node.js.
```yaml{:copy}
name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '12.x'
- run: npm ci
- run: npm run build --if-present
- run: npm test
```
Если не указать версию Node.js, {% data variables.product.prodname_dotcom %} использует версию Node.js по умолчанию, заданную для среды.
{% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% else %} Дополнительные сведения см. в разделе [Спецификации для средств выполнения, размещенных в {% data variables.product.prodname_dotcom %}](/actions/reference/specifications-for-github-hosted-runners/#supported-software).
{% endif %}
## Установка зависимостей
Для размещенных в {% data variables.product.prodname_dotcom %} средств выполнения установлены диспетчеры зависимостей npm и Yarn. Вы можете использовать npm и Yarn для установки зависимостей в рабочем процессе перед созданием и тестированием кода. В Windows и Linux для размещенных в {% data variables.product.prodname_dotcom %} средств выполнения также установлены Grunt, Gulp и Bower.
{% ifversion actions-caching %}Можно также кэшировать зависимости, чтобы ускорить рабочий процесс. Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/using-workflows/caching-dependencies-to-speed-up-workflows).{% endif %}
### Пример использования npm
В этом примере устанавливаются зависимости, определенные в файле *package.json*. Дополнительные сведения см. на веб-сайте [`npm install`](https://docs.npmjs.com/cli/install).
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '12.x'
- name: Install dependencies
run: npm install
```
При использовании `npm ci` версии устанавливаются в файл *package-lock.json* или *npm-shrinkwrap.json*, а также запрещается изменение файла блокировки. Выполнение `npm ci` обычно осуществляется быстрее, чем `npm install`. Дополнительные сведения см. в описании [`npm ci`](https://docs.npmjs.com/cli/ci.html) и разделе [Знакомство с `npm ci` для получения более быстродействующих и надежных сборок](https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable).
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '12.x'
- name: Install dependencies
run: npm ci
```
### Пример использования Yarn
В этом примере устанавливаются зависимости, определенные в файле *package.json*. Дополнительные сведения см. на веб-сайте [`yarn install`](https://yarnpkg.com/en/docs/cli/install).
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '12.x'
- name: Install dependencies
run: yarn
```
Кроме того, можно передать `--frozen-lockfile`, чтобы установить версии в файле `yarn.lock` и запретить изменения файла `yarn.lock`.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '12.x'
- name: Install dependencies
run: yarn --frozen-lockfile
```
### Пример использования частного реестра и создания NPMRC-файла
{% data reusables.actions.setup-node-intro %}
Чтобы пройти проверку подлинности в частном реестре, нужно сохранить маркер проверки подлинности npm в виде секрета. Например, создайте секрет репозитория `NPM_TOKEN`. Дополнительные сведения см. в статье «[Создание и использование зашифрованных секретов](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)».
В приведенном ниже примере в `NPM_TOKEN` секрета хранится токен проверки подлинности npm. Действие `setup-node` настраивает файл *NPMRC* для чтения маркера проверки подлинности npm из переменной среды `NODE_AUTH_TOKEN`. При использовании действия `setup-node` для создания файла *NPMRC* необходимо задать для переменной среды `NODE_AUTH_TOKEN` секрет, содержащий маркер проверки подлинности npm.
Перед установкой зависимостей используйте действие `setup-node` для создания файла *NPMRC*. Это действие имеет два входных параметра. Параметр `node-version` задает версию Node.js, а параметр `registry-url` задает реестр по умолчанию. Если в реестре пакетов используются области, необходимо использовать параметр `scope`. Дополнительные сведения см. на веб-сайте [`npm-scope`](https://docs.npmjs.com/misc/scope).
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
always-auth: true
node-version: '12.x'
registry-url: https://registry.npmjs.org
scope: '@octocat'
- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: {% raw %}${{ secrets.NPM_TOKEN }}{% endraw %}
```
В приведенном выше примере создается файл *NPMRC* со следующим содержимым:
```ini
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
@octocat:registry=https://registry.npmjs.org/
always-auth=true
```
{% ifversion actions-caching %}
### Примеры кэширования зависимостей
Можно кэшировать и восстанавливать зависимости с помощью [`setup-node`действия](https://github.com/actions/setup-node).
В следующем примере кэшируются зависимости для npm.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '14'
cache: 'npm'
- run: npm install
- run: npm test
```
В следующем примере кэшируются зависимости для Yarn.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '14'
cache: 'yarn'
- run: yarn
- run: yarn test
```
В следующем примере кэшируются зависимости для pnpm (версия 6.10 или более поздняя).
```yaml{:copy}
{% data reusables.actions.actions-not-certified-by-github-comment %}
# NOTE: pnpm caching support requires pnpm version >= 6.10.0
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.10.0
- uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '14'
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
```
Если у вас есть особые требования или вам нужно управлять кэшированием более детально, можно использовать [действие `cache`](https://github.com/marketplace/actions/cache). Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/using-workflows/caching-dependencies-to-speed-up-workflows).
{% endif %}
## Создание и тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде. Например, при запуске `npm run build` для выполнения шагов сборки, определенных в файле *package.json*, и `npm test` для выполнения набора тестов, вам нужно добавить эти команды в свой файл рабочего процесса.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Use Node.js
uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '12.x'
- run: npm install
- run: npm run build --if-present
- run: npm test
```
## Упаковка данных рабочего процесса в виде артефактов
Вы можете сохранить артефакты из шагов сборки и тестирования, чтобы просмотреть их после завершения задания. Например, может потребоваться сохранить файлы журналов, основные дампы, результаты теста или снимки экрана. Дополнительные сведения см. в разделе [Сохранение данных рабочего процесса с помощью артефактов](/actions/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts).
## Публикация в реестрах пакетов
Вы можете настроить рабочий процесс для публикации пакета Node.js в реестре пакетов после прохождения тестов CI. Дополнительные сведения о публикации в npm и {% data variables.product.prodname_registry %}см. в разделе [Публикация пакетов Node.js](/actions/automating-your-workflow-with-github-actions/publishing-nodejs-packages).

View File

@@ -0,0 +1,247 @@
---
title: Создание и тестирование для PowerShell
intro: Вы можете создать рабочий процесс непрерывной интеграции для сборки и тестирования проекта PowerShell.
redirect_from:
- /actions/guides/building-and-testing-powershell
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
authors:
- potatoqualitee
type: tutorial
topics:
- CI
- PowerShell
shortTitle: Build & test PowerShell
ms.openlocfilehash: 572c2ee17c948f44a8f8e4006d3729498269a215
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '146180218'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве описано использование PowerShell для CI. Здесь описано, как использовать Pester, устанавливать зависимости, тестировать модуль и выполнять публикацию в коллекции PowerShell.
Размещенные в {% data variables.product.prodname_dotcom %} средства выполнения имеют кэш инструментов с предварительно установленным программным обеспечением, включающим в себя PowerShell и Pester.
{% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% else %}Полный список актуального программного обеспечения и предварительно установленных версий PowerShell и Pester см. в разделе [Спецификации для средств выполнения, размещенных в {% data variables.product.prodname_dotcom %}](/actions/reference/specifications-for-github-hosted-runners/#supported-software).
{% endif %}
## Предварительные требования
Требуются знания YAML и синтаксиса {% data variables.product.prodname_actions %}. Дополнительные сведения см. в статье со [сведениями о {% data variables.product.prodname_actions %}](/actions/learn-github-actions).
Рекомендуется иметь базовое представление о PowerShell и Pester. Дополнительные сведения см. в разделе:
- [Начало работы с PowerShell](https://docs.microsoft.com/powershell/scripting/learn/ps101/01-getting-started)
- [Pester](https://pester.dev)
{% data reusables.actions.enterprise-setup-prereq %}
## Добавление рабочего процесса для Pester
Чтобы автоматизировать тестирование с помощью PowerShell и Pester, можно добавить рабочий процесс, который запускается при каждой отправке изменения в репозиторий. В следующем примере `Test-Path` используется для проверки наличия файла `resultsfile.log`.
Этот пример файла рабочего процесса необходимо добавить в каталог `.github/workflows/` репозитория:
```yaml
name: Test PowerShell on Ubuntu
on: push
jobs:
pester-test:
name: Pester test
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: {% data reusables.actions.action-checkout %}
- name: Perform a Pester test from the command-line
shell: pwsh
run: Test-Path resultsfile.log | Should -Be $true
- name: Perform a Pester test from the Tests.ps1 file
shell: pwsh
run: |
Invoke-Pester Unit.Tests.ps1 -Passthru
```
* `shell: pwsh` — настраивает задание для использования PowerShell при выполнении команд `run`.
* `run: Test-Path resultsfile.log` — проверяет, присутствует ли файл `resultsfile.log` в корневом каталоге репозитория.
* `Should -Be $true` — использует Pester для определения ожидаемого результата. Если получен непредвиденный результат, {% data variables.product.prodname_actions %} помечает этот тест как неудачный. Пример:
![Неудачный тест Pester](/assets/images/help/repository/actions-failed-pester-test-updated.png)
* `Invoke-Pester Unit.Tests.ps1 -Passthru` — использует Pester для выполнения тестов, определенных в файле `Unit.Tests.ps1`. Например, чтобы выполнить тест, аналогичны описанному выше, `Unit.Tests.ps1` будет содержать следующее:
```
Describe "Check results file is present" {
It "Check results file is present" {
Test-Path resultsfile.log | Should -Be $true
}
}
```
## Расположения модулей PowerShell
В приведенной ниже таблице описаны расположения расположений для разных модулей PowerShell в каждом размещенном в {% data variables.product.prodname_dotcom %} средстве выполнения.
|| Ubuntu | macOS | Windows |
|------|-------|------|----------|
|**Системные модули PowerShell** |`/opt/microsoft/powershell/7/Modules/*`|`/usr/local/microsoft/powershell/7/Modules/*`|`C:\program files\powershell\7\Modules\*`|
|**Модули надстроек PowerShell**|`/usr/local/share/powershell/Modules/*`|`/usr/local/share/powershell/Modules/*`|`C:\Modules\*`|
|**Устанавливаемые пользователем модули**|`/home/runner/.local/share/powershell/Modules/*`|`/Users/runner/.local/share/powershell/Modules/*`|`C:\Users\runneradmin\Documents\PowerShell\Modules\*`|
## Установка зависимостей
Для размещенных в {% data variables.product.prodname_dotcom %} средств выполнения установлены PowerShell 7 и Pester. Вы можете использовать `Install-Module` для установки дополнительных зависимостей из коллекции PowerShell перед созданием и тестированием кода.
{% note %}
**Примечание**. Предварительно установленные пакеты (например, Pester), используемые размещенными в {% data variables.product.prodname_dotcom %} средствами выполнения, регулярно обновляются и могут вносить существенные изменения. Поэтому рекомендуется всегда указывать необходимые версии пакетов, используя `Install-Module` с `-MaximumVersion`.
{% endnote %}
{% ifversion actions-caching %}Можно также кэшировать зависимости, чтобы ускорить рабочий процесс. Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/using-workflows/caching-dependencies-to-speed-up-workflows).{% endif %}
Например, следующее задание устанавливает модули `SqlServer` и `PSScriptAnalyzer`:
```yaml
jobs:
install-dependencies:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Install from PSGallery
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module SqlServer, PSScriptAnalyzer
```
{% note %}
**Примечание**. По умолчанию никакие репозитории не являются доверенными для PowerShell. При установке модулей из коллекции PowerShell необходимо явно задать для политики установки `PSGallery` значение `Trusted`.
{% endnote %}
{% ifversion actions-caching %}
### Кэширование зависимостей
Зависимости PowerShell можно кэшировать с помощью уникального ключа, что позволяет восстановить зависимости для будущих рабочих процессов посредством действия [`cache`](https://github.com/marketplace/actions/cache). Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/using-workflows/caching-dependencies-to-speed-up-workflows).
PowerShell кэширует свои зависимости в разных расположениях в зависимости от операционной системы средства выполнения. Например, расположение `path`, используемое в следующем примере Ubuntu, будет отличаться от расположения в операционной системе Windows.
```yaml
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup PowerShell module cache
id: cacher
uses: {% data reusables.actions.action-cache %}
with:
path: "~/.local/share/powershell/Modules"
key: {% raw %}${{ runner.os }}-SqlServer-PSScriptAnalyzer{% endraw %}
- name: Install required PowerShell modules
if: steps.cacher.outputs.cache-hit != 'true'
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module SqlServer, PSScriptAnalyzer -ErrorAction Stop
```
{% endif %}
## Тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде.
### Использование PSScriptAnalyzer для анализа кода
В следующем примере выполняется установка `PSScriptAnalyzer` и его использование для анализа кода всех файлов `ps1` в репозитории. Дополнительные сведения см. в разделе [PSScriptAnalyzer на сайте GitHub](https://github.com/PowerShell/PSScriptAnalyzer).
```yaml
lint-with-PSScriptAnalyzer:
name: Install and run PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Install PSScriptAnalyzer module
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module PSScriptAnalyzer -ErrorAction Stop
- name: Lint with PSScriptAnalyzer
shell: pwsh
run: |
Invoke-ScriptAnalyzer -Path *.ps1 -Recurse -Outvariable issues
$errors = $issues.Where({$_.Severity -eq 'Error'})
$warnings = $issues.Where({$_.Severity -eq 'Warning'})
if ($errors) {
Write-Error "There were $($errors.Count) errors and $($warnings.Count) warnings total." -ErrorAction Stop
} else {
Write-Output "There were $($errors.Count) errors and $($warnings.Count) warnings total."
}
```
## Упаковка данных рабочего процесса в виде артефактов
Вы можете отправить артефакты для просмотра после завершения рабочего процесса. Например, может потребоваться сохранить файлы журналов, основные дампы, результаты теста или снимки экрана. Дополнительные сведения см. в разделе [Сохранение данных рабочего процесса с помощью артефактов](/github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts).
В следующем примере показано, как использовать действие `upload-artifact` для архивации результатов теста, полученных из `Invoke-Pester`. Дополнительные сведения см. в описании [действия `upload-artifact`](https://github.com/actions/upload-artifact).
```yaml
name: Upload artifact from Ubuntu
on: [push]
jobs:
upload-pester-results:
name: Run Pester and upload results
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Test with Pester
shell: pwsh
run: Invoke-Pester Unit.Tests.ps1 -Passthru | Export-CliXml -Path Unit.Tests.xml
- name: Upload test results
uses: {% data reusables.actions.action-upload-artifact %}
with:
name: ubuntu-Unit-Tests
path: Unit.Tests.xml
if: {% raw %}${{ always() }}{% endraw %}
```
Функция `always()` настраивает задание для продолжения обработки даже при наличии сбоев тестов. Дополнительные сведения см. в описании [always](/actions/reference/context-and-expression-syntax-for-github-actions#always).
## Публикация в коллекции PowerShell
Вы можете настроить рабочий процесс для публикации модуля PowerShell в коллекции PowerShell после прохождения тестов CI. Вы можете использовать секреты для хранения любых маркеров или учетных данных, необходимых для публикации пакета. Дополнительные сведения см. в статье «[Создание и использование зашифрованных секретов](/github/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)».
В следующем примере создается пакет, и используется `Publish-Module` для его публикации в коллекции PowerShell:
```yaml
name: Publish PowerShell Module
on:
release:
types: [created]
jobs:
publish-to-gallery:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Build and publish
env:
NUGET_KEY: {% raw %}${{ secrets.NUGET_KEY }}{% endraw %}
shell: pwsh
run: |
./build.ps1 -Path /tmp/samplemodule
Publish-Module -Path /tmp/samplemodule -NuGetApiKey $env:NUGET_KEY -Verbose
```

View File

@@ -0,0 +1,415 @@
---
title: Создание и тестирование для Python
intro: Вы можете создать рабочий процесс непрерывной интеграции для сборки и тестирования проекта Python.
redirect_from:
- /actions/automating-your-workflow-with-github-actions/using-python-with-github-actions
- /actions/language-and-framework-guides/using-python-with-github-actions
- /actions/guides/building-and-testing-python
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Python
shortTitle: Build & test Python
ms.openlocfilehash: a55aa73ce26f4482411366b0edb66d9b1a305966
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '147409470'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве описано, как создавать, тестировать и публиковать пакет Python.
{% ifversion ghae %} {% data reusables.actions.self-hosted-runners-software %} {% else %} Размещенные в {% data variables.product.prodname_dotcom %} средства выполнения имеют кэш инструментов с предварительно установленным программным обеспечением, включающим в себя Python и PyPy. Вам ничего устанавливать не нужно. Полный список актуального программного обеспечения и предварительно установленных версий Python и PyPy см. в разделе [Спецификации для средств выполнения, размещенных в {% data variables.product.prodname_dotcom %}](/actions/reference/specifications-for-github-hosted-runners/#supported-software).
{% endif %}
## Предварительные требования
Требуются знания YAML и синтаксиса {% data variables.product.prodname_actions %}. Дополнительные сведения см. в статье со [сведениями о {% data variables.product.prodname_actions %}](/actions/learn-github-actions).
Рекомендуется иметь базовое представление о Python, PyPy и pip. Дополнительные сведения см. в разделе:
- [Начало работы с Python](https://www.python.org/about/gettingstarted/)
- [PyPy](https://pypy.org/)
- [Диспетчер пакетов pip](https://pypi.org/project/pip/)
{% data reusables.actions.enterprise-setup-prereq %}
## Использование начального рабочего процесса Python
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Python, который должен работать для большинства проектов Python. В этом руководстве приведены примеры, которые можно использовать для настройки начального рабочего процесса. Дополнительные сведения см. в разделе [Начальный рабочий процесс Python](https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml).
Чтобы быстро приступить к работе, добавьте начальный рабочий процесс в каталог `.github/workflows` своего репозитория.
```yaml{:copy}
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python {% raw %}${{ matrix.python-version }}{% endraw %}
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
```
## Указание версии Python
Чтобы использовать предустановленную версию Python или PyPy в размещенном в {% data variables.product.prodname_dotcom %} средстве выполнения, используйте действие `setup-python`. Это действие находит определенную версию Python или PyPy из кэша инструментов в каждом средстве запуска и добавляет необходимые двоичные файлы в переменную `PATH`, которая сохраняется до конца задания. Если определенная предустановленная версия Python отсутствует в кэше инструментов, действие `setup-python` скачивает и настраивает соответствующую версию из репозитория [`python-versions`](https://github.com/actions/python-versions).
Применение действия `setup-python` представляет собой рекомендуемый способ использования Python с {% data variables.product.prodname_actions %}, так как он обеспечивает согласованное поведение в разных средствах выполнения и различных версиях Python. При использовании локального средства выполнения необходимо установить Python и добавить его в `PATH`. Дополнительные сведения см. в описании [действия `setup-python`](https://github.com/marketplace/actions/setup-python).
В приведенной ниже таблице описаны расположения для кэша инструментов в каждом размещенном в {% data variables.product.prodname_dotcom %} средстве выполнения.
|| Ubuntu | Mac | Windows |
|------|-------|------|----------|
|**Каталог кэша инструментов** |`/opt/hostedtoolcache/*`|`/Users/runner/hostedtoolcache/*`|`C:\hostedtoolcache\windows\*`|
|**Кэш инструментов Python**|`/opt/hostedtoolcache/Python/*`|`/Users/runner/hostedtoolcache/Python/*`|`C:\hostedtoolcache\windows\Python\*`|
|**Кэш инструментов PyPy**|`/opt/hostedtoolcache/PyPy/*`|`/Users/runner/hostedtoolcache/PyPy/*`|`C:\hostedtoolcache\windows\PyPy\*`|
Если вы используете локальное средство выполнения, его можно настроить для управления зависимостями с помощью действия `setup-python`. Дополнительные сведения см. в разделе об [использовании setup-python с локальным средством выполнения](https://github.com/actions/setup-python#using-setup-python-with-a-self-hosted-runner) в файле сведений `setup-python`.
{% data variables.product.prodname_dotcom %} поддерживает синтаксис семантического версионирования. Дополнительные сведения см. в разделах [Использование семантического версионирования](https://docs.npmjs.com/about-semantic-versioning#using-semantic-versioning-to-specify-update-types-your-package-can-accept) и [Спецификация семантического версионирования](https://semver.org/).
### Использование нескольких версий Python
```yaml{:copy}
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
# You can use PyPy versions in python-version.
# For example, {% ifversion actions-node16-action %}pypy-2.7 and pypy-3.8{% else %}pypy2 and pypy3{% endif %}
matrix:
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python {% raw %}${{ matrix.python-version }}{% endraw %}
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
```
### Использование определенной версии Python
Вы можете настроить определенную версию Python. Например, 3.9. Кроме того, можно использовать синтаксис семантической версии, чтобы получить последний дополнительный выпуск. В этом примере используется последний дополнительный выпуск Python 3.
```yaml{:copy}
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python 3.x
uses: {% data reusables.actions.action-setup-python %}
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
```
### Исключение версии
Если указать версию Python, которая недоступна, `setup-python` завершается сбоем и выводится ошибка, например `##[error]Version 3.4 with arch x64 not found`. Сообщение об ошибке содержит доступные версии.
Вы также можете использовать ключевое слово `exclude` в рабочем процессе, если существует конфигурация Python, которую не нужно запускать. Дополнительные сведения см. в статье [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy).
```yaml{:copy}
name: Python package
on: [push]
jobs:
build:
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", {% ifversion actions-node16-action %}pypy-2.7, pypy-3.8{% else %}pypy2, pypy3{% endif %}]
exclude:
- os: macos-latest
python-version: "3.7"
- os: windows-latest
python-version: "3.7"
```
### Использование версии Python по умолчанию
Мы рекомендуем использовать `setup-python` для настройки версии Python, используемой в рабочих процессах, так как это помогает сделать зависимости явными. Если вы не используете`setup-python`, при вызове `python` в любой оболочке используется версия Python по умолчанию, заданная в `PATH`. Версия Python по умолчанию зависит от конкретных размещенных в {% data variables.product.prodname_dotcom %} средств выполнения, что может привести к непредвиденным изменениям или использованию более ранней версии по сравнению с ожидаемой.
| Размещенное в {% data variables.product.prodname_dotcom %} средство выполнения | Описание |
|----|----|
| Ubuntu | Средства выполнения Ubuntu имеют несколько версий системного Python, установленных в `/usr/bin/python` и `/usr/bin/python3`. Версии Python, упакованные вместе с Ubuntu, являются дополнением к версиям, которые {% data variables.product.prodname_dotcom %} устанавливаем в кэше инструментов. |
| Windows | За исключением версий Python, которые находятся в кэше инструментов, Windows не содержит эквивалентной версии системного Python. Чтобы обеспечить согласованную работу с другими средствами выполнения и обеспечить использование Python в исходном виде без действия `setup-python`, {% data variables.product.prodname_dotcom %} добавляет несколько версий из кэша инструментов в `PATH`.|
| macOS | Средства выполнения macOS имеют несколько установленных версий системного Python в дополнение к версиям, входящим в состав кэша инструментов. Версии системного Python находятся в каталоге `/usr/local/Cellar/python/*`. |
## Установка зависимостей
Для размещенных в {% data variables.product.prodname_dotcom %} средств выполнения установлен диспетчер пакетов pip. Вы можете использовать pip для установки зависимостей из реестра пакетов PyPI перед созданием и тестированием кода. Например, приведенный ниже код YAML устанавливает или обновляет установщик пакетов `pip` и пакеты `setuptools` и `wheel`.
{% ifversion actions-caching %}Можно также кэшировать зависимости, чтобы ускорить рабочий процесс. Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/using-workflows/caching-dependencies-to-speed-up-workflows).{% endif %}
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: '3.x'
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel
```
### Файл требований
Типичным следующим шагом после обновления `pip` является установка зависимостей из *requirements.txt*. Дополнительные сведения см. в описании [pip](https://pip.pypa.io/en/stable/cli/pip_install/#example-requirements-file).
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
```
{% ifversion actions-caching %}
### Кэширование зависимостей
Можно кэшировать и восстанавливать зависимости с помощью [действия`setup-python`](https://github.com/actions/setup-python).
В следующем примере кэшируются зависимости для pip.
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-python %}
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- run: pip test
```
По умолчанию действие `setup-python` ищет файл зависимостей (`requirements.txt` для pip, `Pipfile.lock` для pipenv или `poetry.lock` для poetry) во всем репозитории. Дополнительные сведения см. в разделе [Кэширование зависимостей пакетов](https://github.com/actions/setup-python#caching-packages-dependencies) в файле README `setup-python`.
Если у вас есть особые требования или вам нужно управлять кэшированием более детально, можно использовать [действие `cache`](https://github.com/marketplace/actions/cache). Pip кэширует зависимости в разных расположениях в зависимости от операционной системы средства выполнения. Путь, по которому требуется выполнить кэширование, может отличаться от приведенного выше примера Ubuntu в зависимости от используемой операционной системы. Дополнительные сведения см. в [примерах кэширования Python](https://github.com/actions/cache/blob/main/examples.md#python---pip) в репозитории действия `cache`.
{% endif %}
## Тестирование кода
Вы можете использовать те же команды, которые используются для создания и тестирования кода в локальной среде.
### Тестирование с помощью pytest и pytest-cov
В этом примере устанавливаются или обновляются `pytest` и `pytest-cov`. Затем выполняются тесты, выходные данные выводятся в формате JUnit, а результаты по объему протестированного кода выводятся в Cobertura. Дополнительные сведения см. в описании [JUnit](https://junit.org/junit5/) и [Cobertura](https://cobertura.github.io/cobertura/).
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test with pytest
run: |
pip install pytest
pip install pytest-cov
pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
```
### Использование Flake8 для анализа кода
В следующем примере выполняется установка или обновление `flake8` и его использование для анализа кода всех файлов. Дополнительные сведения см. в описании [Flake8](http://flake8.pycqa.org/en/latest/).
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
flake8 .
continue-on-error: true
```
На шаге анализа кода задан параметр `continue-on-error: true`. Это предотвратит сбой рабочего процесса, если шаг анализа кода завершится неудачно. Когда вы устраните все ошибки анализа кода, можете удалить этот параметр, чтобы рабочий процесс регистрировал новые проблемы.
### Выполнение тестов с помощью tox
В {% data variables.product.prodname_actions %}можно выполнять тесты с помощью tox и распределять работу между несколькими заданиями. Чтобы выбрать версию Python в `PATH`, а не указывать конкретную версию, нужно вызвать tox с использованием `-e py`. Дополнительные сведения см. в описании [tox](https://tox.readthedocs.io/en/latest/).
```yaml{:copy}
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup Python
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: {% raw %}${{ matrix.python }}{% endraw %}
- name: Install tox and any other packages
run: pip install tox
- name: Run tox
# Run tox using the version of Python in `PATH`
run: tox -e py
```
## Упаковка данных рабочего процесса в виде артефактов
Вы можете отправить артефакты для просмотра после завершения рабочего процесса. Например, может потребоваться сохранить файлы журналов, основные дампы, результаты теста или снимки экрана. Дополнительные сведения см. в разделе [Сохранение данных рабочего процесса с помощью артефактов](/github/automating-your-workflow-with-github-actions/persisting-workflow-data-using-artifacts).
В следующем примере показано, как использовать действие `upload-artifact` для архивации результатов теста при выполнении `pytest`. Дополнительные сведения см. в описании [действия `upload-artifact`](https://github.com/actions/upload-artifact).
```yaml{:copy}
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Setup Python # Set Python version
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
# Install pip and pytest
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Test with pytest
run: pytest tests.py --doctest-modules {% raw %}--junitxml=junit/test-results-${{ matrix.python-version }}.xml{% endraw %}
- name: Upload pytest test results
uses: {% data reusables.actions.action-upload-artifact %}
with:
name: {% raw %}pytest-results-${{ matrix.python-version }}{% endraw %}
path: {% raw %}junit/test-results-${{ matrix.python-version }}.xml{% endraw %}
# Use always() to always run this step to publish test results when there are test failures
if: {% raw %}${{ always() }}{% endraw %}
```
## Публикация в реестрах пакетов
Вы можете настроить рабочий процесс для публикации пакета Python в реестре пакетов после прохождения тестов CI. В этом разделе показано, как использовать {% data variables.product.prodname_actions %} для отправки пакета в PyPI при каждой [публикации выпуска](/github/administering-a-repository/managing-releases-in-a-repository).
В этом примере потребуется создать два [маркера API PyPI](https://pypi.org/help/#apitoken). Вы можете использовать секреты для хранения маркеров доступа или учетных данных, необходимых для публикации пакета. Дополнительные сведения см. в статье «[Создание и использование зашифрованных секретов](/github/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)».
```yaml{:copy}
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Upload Python Package
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Python
uses: {% data reusables.actions.action-setup-python %}
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: {% raw %}${{ secrets.PYPI_API_TOKEN }}{% endraw %}
```
Дополнительные сведения о начальном рабочем процессе см. в описании [`python-publish`](https://github.com/actions/starter-workflows/blob/main/ci/python-publish.yml).

View File

@@ -0,0 +1,331 @@
---
title: Создание и тестирование для Ruby
intro: Вы можете создать рабочий процесс непрерывной интеграции для сборки и тестирования проекта Ruby.
redirect_from:
- /actions/guides/building-and-testing-ruby
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Ruby
shortTitle: Build & test Ruby
ms.openlocfilehash: d6408613be9666dc86e982f99dcba47bbe3f7f9b
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '147408990'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве показано, как получить рабочий процесс непрерывной интеграции (CI), который создает и тестирует приложение Ruby. Если тесты CI проходят правильно, может потребоваться развернуть код или опубликовать пакет.
## Предварительные требования
Рекомендуется иметь базовое представление о Ruby, YAML, параметрах конфигурации рабочих процессов, а также о том, как создавать файл рабочего процесса. Дополнительные сведения см. в разделе:
- [Сведения о {% data variables.product.prodname_actions %}](/actions/learn-github-actions)
- [Ruby за 20 минут](https://www.ruby-lang.org/en/documentation/quickstart/)
## Использование начального рабочего процесса Ruby
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Ruby, который будет работать для большинства проектов Ruby. Дополнительные сведения см. в разделе [Начальный рабочий процесс Ruby](https://github.com/actions/starter-workflows/blob/master/ci/ruby.yml).
Чтобы быстро приступить к работе, добавьте начальный рабочий процесс в каталог `.github/workflows` своего репозитория. В показанном ниже рабочем процессе предполагается, что ветвью по умолчанию для вашего репозитория является `main`.
```yaml
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Ruby
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Ruby
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
with:
ruby-version: '3.1'
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
```
## Указание версии Ruby
Самый простой способ указать версию Ruby заключается в использовании действия `ruby/setup-ruby`, предоставляемого организацией Ruby на GitHub. Это действие добавляет любую поддерживаемую версию Ruby в `PATH` для каждого задания, выполняемого в рабочем процессе. Дополнительные сведения и доступные версии Ruby см. в описании [`ruby/setup-ruby`](https://github.com/ruby/setup-ruby).
Применение действия `ruby/setup-ruby` Ruby представляет собой рекомендуемый способ использования Ruby с GitHub Actions, так как он обеспечивает согласованное поведение в разных средствах выполнения и различных версиях Ruby.
Действие `setup-ruby` принимает версию Ruby в качестве входных данных и настраивает ее в средстве выполнения.
```yaml
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
- run: bundle install
- run: bundle exec rake
```
Кроме того, можно проверить файл `.ruby-version` в корне репозитория, чтобы `setup-ruby` использовал определенную в этом файле версию.
## Тестирование с использованием нескольких версий Ruby
Вы можете добавить матричную стратегию для запуска рабочего процесса с несколькими версиями Ruby. Например, вы можете протестировать код для последних выпусков исправлений в версиях 3.1, 3.0 и 2.7.
{% raw %}
```yaml
strategy:
matrix:
ruby-version: ['3.1', '3.0', '2.7']
```
{% endraw %}
Каждая версия Ruby, указанная в массиве `ruby-version`, создает задание, которое выполняет одни и те же действия. Контекст {% raw %}`${{ matrix.ruby-version }}`{% endraw %} используется для доступа к версии текущего задания. Дополнительные сведения о матричных стратегиях и контекстах см. в разделах [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/learn-github-actions/workflow-syntax-for-github-actions) и [Контексты](/actions/learn-github-actions/contexts).
Полный обновленный рабочий процесс с матричной стратегией может выглядеть следующим образом:
```yaml
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Ruby CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1', '3.0', '2.7']
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: {% raw %}Set up Ruby ${{ matrix.ruby-version }}{% endraw %}
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
with:
ruby-version: {% raw %}${{ matrix.ruby-version }}{% endraw %}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake
```
## Установка зависимостей с использованием средства увязки в пакеты
Действие `setup-ruby` установит средство увязки в пакеты автоматически. Версия определяется по файлу `gemfile.lock`. Если в файле блокировки отсутствует версия, будет установлена последняя совместимая версия.
```yaml
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
with:
ruby-version: '3.1'
- run: bundle install
```
{% ifversion actions-caching %}
### Кэширование зависимостей
Действия `setup-ruby` предоставляют метод автоматической обработки кэширования пакетов между запусками.
Чтобы включить кэширование, укажите следующее.
{% raw %}
```yaml
steps:
- uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
with:
bundler-cache: true
```
{% endraw %}
При этом средство увязки в пакеты будет настроено для установки пакетов в `vendor/cache`. Для каждого успешного выполнения рабочего процесса эта папка будет кэширована {% data variables.product.prodname_actions %} и повторно скачана для последующих выполнений рабочего процесса. Хэш файла gemfile.lock и версия Ruby используются в качестве ключа кэша. Если вы устанавливаете новые пакеты или изменяете версию, кэш станет недействительным, а средство увязки в пакеты выполнит новую установку.
**Кэширование без использования setup-ruby**
Для более широкого контроля над кэшированием можно напрямую использовать действие `actions/cache`. Дополнительные сведения см. в разделе [Кэширование зависимостей для ускорения рабочих процессов](/actions/using-workflows/caching-dependencies-to-speed-up-workflows).
```yaml
steps:
- uses: {% data reusables.actions.action-cache %}
with:
path: vendor/bundle
key: {% raw %}${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}{% endraw %}
restore-keys: |
{% raw %}${{ runner.os }}-gems-{% endraw %}
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
```
Если вы используете матричную сборку, потребуется включить матричные переменные в ключ кэша. Например, если у вас есть матричная стратегия для разных версий ruby (`matrix.ruby-version`) и различных операционных систем (`matrix.os`), шаги рабочего процесса могут выглядеть следующим образом:
```yaml
steps:
- uses: {% data reusables.actions.action-cache %}
with:
path: vendor/bundle
key: {% raw %}bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}{% endraw %}
restore-keys: |
{% raw %}bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-{% endraw %}
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
```
{% endif %}
## Матричное тестирование кода
В следующем примере выполняется матричное тестирование всех стабильных выпусков и головных версий MRI, JRuby и TruffleRuby на базе Ubuntu и macOS.
```yaml
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Matrix Testing
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: {% raw %}${{ matrix.os }}-latest{% endraw %}
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
ruby: [2.5, 2.6, 2.7, head, debug, jruby, jruby-head, truffleruby, truffleruby-head]
continue-on-error: {% raw %}${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}{% endraw %}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
with:
ruby-version: {% raw %}${{ matrix.ruby }}{% endraw %}
- run: bundle install
- run: bundle exec rake
```
## Анализ кода
В следующем примере выполняется установка `rubocop` и его использование для анализа кода всех файлов. Дополнительные сведения см. в описании [RuboCop](https://github.com/rubocop-hq/rubocop). Вы можете [настроить Rubocop](https://docs.rubocop.org/rubocop/configuration.html), чтобы задать конкретные правила анализа.
```yaml
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Linting
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
with:
ruby-version: 2.6
- run: bundle install
- name: Rubocop
run: rubocop
```
## Публикация пакетов
Вы можете настроить рабочий процесс для публикации пакета Ruby в любом подходящем реестре пакетов после прохождения тестов CI.
Вы можете хранить любые маркеры доступа или учетные данные, необходимые для публикации пакета, с помощью секретов репозитория. В следующем примере создается пакет, который публикуется в `GitHub Package Registry` и `RubyGems`.
```yaml
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Ruby Gem
on:
# Manually publish
workflow_dispatch:
# Alternatively, publish whenever changes are merged to the `main` branch.
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
with:
ruby-version: 2.6
- run: bundle install
- name: Publish to GPR
run: |{% raw %}
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}
- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"{% endraw %}
```

View File

@@ -0,0 +1,132 @@
---
title: Создание и тестирование для Swift
intro: Вы можете создать рабочий процесс непрерывной интеграции для сборки и тестирования проекта Swift.
redirect_from:
- /actions/guides/building-and-testing-swift
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Swift
shortTitle: Build & test Swift
ms.openlocfilehash: 5717f9c7a939d2347ea5a49458002185c3ec07eb
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '147408998'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве описано, как создавать и тестировать пакет Swift.
{% ifversion ghae %} Чтобы создать и протестировать проект Swift на платформе {% data variables.product.prodname_ghe_managed %}, требуются необходимые зависимости Swift. Размещенные в {% data reusables.actions.self-hosted-runners-software %} {% else %}{% data variables.product.prodname_dotcom %} средства выполнения тестов имеют кэш инструментов с предварительно установленным программным обеспечением, а средства выполнения тестов Ubuntu и macOS включают в себя зависимости для создания пакетов Swift. Полный список актуальных программ и предварительно установленных версий Swift и Xcode см. в статье [Сведения о средствах выполнения тестов, размещенных в GitHub](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-software).{% endif %}
## Предварительные требования
Вы уже должны быть знакомы с синтаксисом YAML и его использованием с {% data variables.product.prodname_actions %}. Дополнительные сведения см. в статье [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions).
Рекомендуется иметь базовое представление о пакетах Swift. Дополнительные сведения см. в статье [Пакеты Swift](https://developer.apple.com/documentation/swift_packages) документации Apple для разработчиков.
## Использование начального рабочего процесса Swift
{% data variables.product.prodname_dotcom %} предоставляет начальный рабочий процесс Swift, который должен работать для большинства проектов Swift. В этом руководстве приведены примеры настройки начального рабочего процесса. Дополнительные сведения см. в разделе [Начальный рабочий процесс Swift](https://github.com/actions/starter-workflows/blob/main/ci/swift.yml).
Чтобы быстро приступить к работе, добавьте начальный рабочий процесс в каталог `.github/workflows` своего репозитория.
```yaml{:copy}
name: Swift
on: [push]
jobs:
build:
runs-on: macos-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Build
run: swift build
- name: Run tests
run: swift test
```
## Указание версии Swift
Чтобы использовать конкретную предварительно установленную версию Swift в размещенном в {% data variables.product.prodname_dotcom %} средстве выполнения тестов, примените действие `fwal/setup-swift`. Это действие находит определенную версию Swift из кэша инструментов в средстве выполнения тестов и добавляет необходимые двоичные файлы в переменную `PATH`. Эти изменения будут сохранены для остальной части задания. Дополнительные сведения см. в описании действия [`fwal/setup-swift`](https://github.com/marketplace/actions/setup-swift).
При использовании локального средства выполнения тестов необходимо установить нужные версии Swift и добавить их в `PATH`.
В приведенных ниже примерах показано использование действия `fwal/setup-swift`.
### Использование нескольких версий Swift
Задание можно настроить для использования нескольких версий Swift в матрице.
```yaml{:copy}
{% data reusables.actions.actions-not-certified-by-github-comment %}
{% data reusables.actions.actions-use-sha-pinning-comment %}
name: Swift
on: [push]
jobs:
build:
name: {% raw %}Swift ${{ matrix.swift }} on ${{ matrix.os }}{% endraw %}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
swift: ["5.2", "5.3"]
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
steps:
- uses: fwal/setup-swift@2040b795e5c453c3a05fcb8316496afc8a74f192
with:
swift-version: {% raw %}${{ matrix.swift }}{% endraw %}
- uses: {% data reusables.actions.action-checkout %}
- name: Build
run: swift build
- name: Run tests
run: swift test
```
### Использование одной определенной версии Swift
Вы можете настроить задание для использования одной конкретной версии Swift, например `5.3.3`.
{% raw %}
```yaml{:copy}
steps:
- uses: fwal/setup-swift@2040b795e5c453c3a05fcb8316496afc8a74f192
with:
swift-version: "5.3.3"
- name: Get swift version
run: swift --version # Swift 5.3.3
```
{% endraw %}
## Создание и тестирование кода
Вы можете использовать те же команды, которые используете в локальной среде для создания и тестирования кода с помощью Swift. В этом примере показано, как использовать `swift build` и `swift test` в задании:
```yaml{:copy}
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: fwal/setup-swift@2040b795e5c453c3a05fcb8316496afc8a74f192
with:
swift-version: "5.3.3"
- name: Build
run: swift build
- name: Run tests
run: swift test
```

View File

@@ -0,0 +1,122 @@
---
title: Создание и тестирование приложений Xamarin
intro: Рабочий процесс непрерывной интеграции (CI) можно создать в GitHub Actions для сборки и тестирования приложения Xamarin.
redirect_from:
- /actions/guides/building-and-testing-xamarin-applications
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- CI
- Xamarin
- Xamarin.iOS
- Xamarin.Android
- Android
- iOS
shortTitle: Build & test Xamarin apps
ms.openlocfilehash: 2e4e9a8eb73cd9dc2ef054c6c3ac48a9beadd9d1
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '147518931'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
В этом руководстве показано, как создать рабочий процесс, который выполняет непрерывную интеграцию (CI) для вашего проекта Xamarin. Создаваемый рабочий процесс позволит увидеть, когда фиксации в запросе на вытягивание вызывают сбои в сборке или тестировании ветви по умолчанию; этот подход поможет убедиться, что ваш код всегда работоспособен.
Полный список доступных версий пакета SDK для Xamarin в средствах выполнения macOS, размещенных в {% data variables.product.prodname_actions %}, см. в следующей документации:
* [macOS 10.15](https://github.com/actions/runner-images/blob/main/images/macos/macos-10.15-Readme.md#xamarin-bundles)
* [macOS 11](https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md#xamarin-bundles)
{% data reusables.actions.macos-runner-preview %}
## Предварительные требования
Рекомендуется иметь базовое представление о Xamarin, пакете SDK для .NET Core, YAML, параметрах конфигурации рабочих процессов, а также о том, как создавать файл рабочего процесса. Дополнительные сведения см. в разделе:
- [Синтаксис рабочего процесса для {% data variables.product.prodname_actions %}](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions)
- [Начало работы с .NET](https://dotnet.microsoft.com/learn)
- [Изучение Xamarin](https://dotnet.microsoft.com/learn/xamarin)
## Создание приложений Xamarin.iOS
В приведенном ниже примере показано, как изменить версии пакета SDK для Xamarin по умолчанию и создать приложение Xamarin.iOS.
```yaml
name: Build Xamarin.iOS app
on: [push]
jobs:
build:
runs-on: macos-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set default Xamarin SDK versions
run: |
$VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --ios=14.10
- name: Set default Xcode 12.3
run: |
XCODE_ROOT=/Applications/Xcode_12.3.0.app
echo "MD_APPLE_SDK_ROOT=$XCODE_ROOT" >> $GITHUB_ENV
sudo xcode-select -s $XCODE_ROOT
- name: Setup .NET Core SDK 5.0.x
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: '5.0.x'
- name: Install dependencies
run: nuget restore <sln_file_path>
- name: Build
run: msbuild <csproj_file_path> /p:Configuration=Debug /p:Platform=iPhoneSimulator /t:Rebuild
```
## Создание приложения Xamarin.Android
В приведенном ниже примере показано, как изменить версии пакета SDK для Xamarin по умолчанию и создать приложение Xamarin.Android.
```yaml
name: Build Xamarin.Android app
on: [push]
jobs:
build:
runs-on: macos-latest
steps:
- uses: {% data reusables.actions.action-checkout %}
- name: Set default Xamarin SDK versions
run: |
$VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.10 --android=10.2
- name: Setup .NET Core SDK 5.0.x
uses: {% data reusables.actions.action-setup-dotnet %}
with:
dotnet-version: '5.0.x'
- name: Install dependencies
run: nuget restore <sln_file_path>
- name: Build
run: msbuild <csproj_file_path> /t:PackageForAndroid /p:Configuration=Debug
```
## Указание версии .NET
Чтобы использовать предустановленную версию пакета SDK для .NET Core в размещенном в {% data variables.product.prodname_dotcom %} средстве выполнения, используйте действие `setup-dotnet`. Это действие находит определенную версию .NET из кэша инструментов в средстве выполнения и добавляет необходимые двоичные файлы в переменную `PATH`. Эти изменения будут сохранены для остальной части задания.
Действие `setup-dotnet` представляет собой рекомендуемый способ использования .NET с {% data variables.product.prodname_actions %}, так как он обеспечивает согласованное поведение в разных средствах выполнения и различных версиях .NET. При использовании локального средства выполнения необходимо установить .NET и добавить его в `PATH`. Дополнительные сведения см. в описании действия [`setup-dotnet`](https://github.com/marketplace/actions/setup-net-core-sdk).

View File

@@ -0,0 +1,39 @@
---
title: Автоматизация сборок и тестов
shortTitle: Build and test
intro: 'Вы можете автоматически создавать и тестировать проекты с помощью {% data variables.product.prodname_actions %}.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
redirect_from:
- /actions/building-and-testing-code-with-continuous-integration
- /actions/language-and-framework-guides
- /actions/language-and-framework-guides/github-actions-for-docker
- /actions/language-and-framework-guides/github-actions-for-java
- /actions/language-and-framework-guides/github-actions-for-javascript-and-typescript
- /actions/language-and-framework-guides/github-actions-for-python
- /actions/guides/building-and-testing-nodejs-or-python
- /actions/automating-builds-and-tests/building-and-testing-nodejs-or-python
children:
- /about-continuous-integration
- /building-and-testing-go
- /building-and-testing-java-with-ant
- /building-and-testing-java-with-gradle
- /building-and-testing-java-with-maven
- /building-and-testing-net
- /building-and-testing-nodejs
- /building-and-testing-powershell
- /building-and-testing-python
- /building-and-testing-ruby
- /building-and-testing-swift
- /building-and-testing-xamarin-applications
ms.openlocfilehash: fb95fa1cbd04dfd8484755fd5ee444a8fae93a38
ms.sourcegitcommit: 80842b4e4c500daa051eff0ccd7cde91c2d4bb36
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/12/2022
ms.locfileid: '146682288'
---

View File

@@ -0,0 +1,174 @@
---
title: Сведения о настраиваемых действиях
intro: 'Действия — это отдельные задачи, которые можно совместить, чтобы создавать задачи и настраивать рабочие процессы разработки. Вы можете создавать собственные действия или использовать и настраивать действия, которые предоставляются сообществом {% data variables.product.prodname_dotcom %}.'
redirect_from:
- /articles/about-actions
- /github/automating-your-workflow-with-github-actions/about-actions
- /actions/automating-your-workflow-with-github-actions/about-actions
- /actions/building-actions/about-actions
- /actions/creating-actions/about-actions
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: overview
topics:
- Action development
- Fundamentals
ms.openlocfilehash: ac933a5014750f75373fafa7f8dd52333b79a469
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '147154576'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Сведения о настраиваемых действиях
Вы можете создавать действия путем написания специального кода, взаимодействующего с репозиторием любым желательным вам способом, включая интеграцию с API-интерфейсами {% data variables.product.prodname_dotcom %} и любым общедоступным сторонним API. Например, действие может публиковать модули NPM, отправлять SMS-оповещения при возникновении неотложных проблем или развертывать готовый код.
{% ifversion fpt or ghec %} Вы можете написать собственные действия для использования в рабочем процессе или поделиться созданными действиями с сообществом {% data variables.product.prodname_dotcom %}. Чтобы можно было делиться созданными действиями с остальными пользователями, ваш репозиторий должен быть общедоступным. {% ifversion internal-actions %}Чтобы делиться действиями только в пределах предприятия, ваш репозиторий должен быть внутренним.{% endif %} {% endif %}
Действия можно выполнять непосредственно на компьютере или в контейнере Docker. Вы можете определить входные и выходные данные, а также переменные среды для действия.
## Типы действий
Вы можете создать контейнер Docker и действия JavaScript. Для действий требуется файл метаданных, чтобы определить входные и выходные данные, а также основную точку входа для действия. Файл метаданных должен иметь имя `action.yml` либо `action.yaml`. Дополнительные сведения см. в разделе [Синтаксис метаданных для {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions).
| Тип | Операционная система |
| ---- | ------------------- |
| Контейнер Docker | Linux |
| JavaScript | Linux, macOS, Windows |
| Составные действия | Linux, macOS, Windows |
### Действия контейнера Docker
Контейнеры Docker упаковывают среду с помощью кода {% data variables.product.prodname_actions %}. Это создает более согласованную и надежную единицу работы, так как потребителю действия не нужно беспокоиться о средствах или зависимостях.
Контейнер Docker позволяет использовать определенные версии операционной системы, зависимостей, средств и кода. Для действий, которые должны выполняться в определенной конфигурации среды, Docker является оптимальным вариантом, так как позволяет настроить операционную систему и средства. Из-за задержки при создании и извлечении контейнера действия контейнера Docker выполняются медленнее, чем действия JavaScript.
Действия контейнера Docker могут выполняться только в средствах выполнения с операционной системой Linux. {% data reusables.actions.self-hosted-runner-reqs-docker %}
### Действия JavaScript
Действия JavaScript могут выполняться непосредственно на компьютере со средством выполнения тестов и отделять код действия от среды, используемой для выполнения такого кода. Использование действия JavaScript упрощает код действия и позволяет ему выполняться быстрее действия контейнера Docker.
{% data reusables.actions.pure-javascript %}
Если вы разрабатываете проект Node.js, набор средств {% data variables.product.prodname_actions %} предоставляет пакеты, которые можно использовать в проекте для ускорения разработки. Дополнительные сведения см. в репозитории [actions/toolkit](https://github.com/actions/toolkit).
### Составные действия
_Составное_ действие позволяет сочетать несколько шагов рабочего процесса в одном действии. Например, с помощью этой функции можно объединить несколько команд выполнения в действие, а затем использовать рабочий процесс, который выполняет такие объединенные команды за один шаг с помощью этого действия. Чтобы просмотреть пример, см. раздел [Создание составного действия](/actions/creating-actions/creating-a-composite-action).
## Выбор расположения для действия
Если вы разрабатываете действие для других пользователей, рекомендуется сохранить действие в собственном репозитории вместо объединения его с другим кодом приложения. Это позволяет осуществлять управление версиями, отслеживание и выпуск для действия точно так же, как и для любого другого программного обеспечения.
{% ifversion fpt or ghec %} Хранение действия в собственном репозитории упрощает обнаружение действия в сообществе {% data variables.product.prodname_dotcom %}, ограничивает область базы кода для разработчиков, устраняющих проблемы и расширяющих действие, а также отделяет управление версиями от версий другого кода приложения.
{% endif %}
{% data reusables.actions.internal-actions-summary %}
{% ifversion fpt or ghec %}Если вы создаете действие, которое не планируете делать доступным для других пользователей, вы {% else %} вы{% endif %} можете хранить файлы этого действия в любом расположении своего репозитория. Если вы планируете объединить действие, рабочий процесс и код приложения в одном репозитории, рекомендуется хранить действия в каталоге `.github`. Например, `.github/actions/action-a` и `.github/actions/action-b`.
## Совместимость с {% data variables.product.prodname_ghe_server %}
Чтобы убедиться, что ваше действие совместимо с {% data variables.product.prodname_ghe_server %}, следует убедиться, что не используются жестко заданные ссылки на URL-адреса API {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %}. Вместо этого следует использовать переменные среды для ссылки на API {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %}:
- Для REST API используйте переменную среды `GITHUB_API_URL`.
- Для GraphQL используйте переменную среды `GITHUB_GRAPHQL_URL`.
Дополнительные сведения см. в разделе [Переменные среды по умолчанию](/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables).
## Использование управления выпусками для действий
В этом разделе объясняется, как использовать управление выпусками, чтобы обеспечить предсказуемое распространение обновлений для действий.
### Рекомендации по управлению выпусками
Если вы разрабатываете действие для других пользователей, мы рекомендуем использовать управление выпусками для управления распространением обновлений. Пользователи могут ожидать, что версия исправления действия включает в себя необходимые критические исправления и обновления системы безопасности, сохраняя при этом совместимость с существующими рабочими процессами. Рекомендуется выпускать новый основной номер версии всякий раз, когда изменения затрагивают совместимость.
Under this release management approach, users should not be referencing an action's <code>master</code> branch, as it's likely to contain the latest code and consequently might be unstable. Вместо этого можно порекомендовать, чтобы пользователи указывали основной номер версии при использовании действия, и перенаправлять их к более конкретной версии только при возникновении проблем.
Чтобы использовать определенную версию действия, пользователи могут настроить рабочий процесс {% data variables.product.prodname_actions %} для тега, SHA фиксации или ветви, названной по выпуску.
### Использование тегов для управления выпусками
Мы рекомендуем использовать теги для управления выпусками действий. С помощью этого подхода пользователи могут легко различать основной и дополнительный номера версии:
- Создайте и проверьте выпуск в ветви выпуска (например, `release/v1`) перед созданием тега выпуска (например, `v1.0.2`).
- Создайте выпуск с помощью семантического версионирования. Дополнительные сведения см. в разделе [Создание выпусков](/articles/creating-releases).
- Перемещайте тег основной версии (например `v1`, `v2`) чтобы указать ссылку на Git текущего выпуска. Дополнительные сведения см. в разделе [Основы Git — расстановка тегов](https://git-scm.com/book/en/v2/Git-Basics-Tagging).
- Вводите новый тег основной версии (`v2`) для изменений, которые будут нарушить существующие рабочие процессы. Например, изменение входных данных действия будет критическим изменением.
- Основные номера версии могут быть первоначально выпущены с тегом `beta`, чтобы указать их состояние, например, `v2-beta`. Затем, когда все будет готово, тег `-beta` можно удалить.
В этом примере показано, как пользователь может ссылаться на тег основного выпуска:
```yaml
steps:
- uses: actions/javascript-action@v1
```
В этом примере показано, как пользователь может ссылаться на тег определенного выпуска исправления:
```yaml
steps:
- uses: actions/javascript-action@v1.0.1
```
### Использование ветвей для управления выпусками
Если вы предпочитаете использовать имена ветвей для управления выпусками, в этом примере показано, как ссылаться на именованную ветвь:
```yaml
steps:
- uses: actions/javascript-action@v1-beta
```
### Использование SHA фиксации для управления выпусками
Каждая фиксация Git получает вычисляемое значение SHA, которое является уникальным и неизменяемым. Пользователи вашего действия могут предпочесть использование значения SHA фиксации, так как такой подход может оказаться более надежным, чем указание тега, который может быть удален или перемещен. Однако это означает, что пользователи не получат дальнейшие обновления для такого действия. Необходимо использовать полное значение SHA фиксации, а не сокращенное.
```yaml
steps:
- uses: actions/javascript-action@172239021f7ba04fe7327647b213799853a9eb89
```
## Создание файла сведений для действия
Мы рекомендуем создать файл сведений, чтобы помочь людям понять, как следует использовать ваше действие. В файл `README.md` можно включить следующее:
- подробное описание того, что делает действие;
- обязательные входные и выходные аргументы;
- необязательные входные и выходные аргументы;
- секреты, используемые действием;
- переменные среды, используемые действием;
- пример использования действия в рабочем процессе.
## Сравнение {% data variables.product.prodname_actions %} с {% data variables.product.prodname_github_apps %}
{% data variables.product.prodname_marketplace %} предлагает средства для улучшения рабочего процесса. Понимание различий и преимуществ каждого средства поможет вам выбрать оптимальный инструмент для работы. Дополнительные сведения о создании приложений см. в разделе [Сведения о приложениях](/apps/about-apps/).
### Преимущества GitHub Actions и GitHub Apps
Хотя как {% data variables.product.prodname_actions %}, так и {% data variables.product.prodname_github_apps %} позволяют создавать средства автоматизации и рабочих процессов, каждый из них имеет сильные стороны, которые делают их полезными в разных ситуациях.
{% data variables.product.prodname_github_apps %}:
* выполняется постоянно и быстро реагирует на события;
* отлично подходит для случаев, когда нужны постоянные данные;
* лучше всего работает с запросами API, которые не требуют много времени;
* выполняется на сервере или в вычислительной инфраструктуре, которые вы предоставляете.
{% data variables.product.prodname_actions %}:
* обеспечивает автоматизацию, которая позволяет осуществлять непрерывную интеграцию и непрерывное развертывание;
* может выполняться непосредственно на компьютерах со средствами выполнения или в контейнерах Docker;
* может включать доступ к клону репозитория, предоставляя средствам развертывания и публикации, форматировщикам кода и программам командной строки доступ к коду;
* не требует развертывания кода или обслуживания приложения;
* имеет простой интерфейс для создания и использования секретов, что позволяет действиям взаимодействовать со сторонними службами без необходимости хранить учетные данные пользователя, применяющего действие.
## Дополнительные материалы
- [Средства разработки для {% data variables.product.prodname_actions %}](/articles/development-tools-for-github-actions)

View File

@@ -0,0 +1,142 @@
---
title: Creating a composite action
shortTitle: Create a composite action
intro: 'In this guide, you''ll learn how to build a composite action.'
redirect_from:
- /actions/creating-actions/creating-a-composite-run-steps-action
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- Action development
---
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## Introduction
In this guide, you'll learn about the basic components needed to create and use a packaged composite action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" and then "Goodbye", or if you provide a custom name, it prints "Hello [who-to-greet]" and then "Goodbye". The action also maps a random number to the `random-number` output variable, and runs a script named `goodbye.sh`.
Once you complete this project, you should understand how to build your own composite action and test it in a workflow.
{% data reusables.actions.context-injection-warning %}
## Prerequisites
Before you begin, you'll create a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}.
1. Create a new public repository on {% data variables.location.product_location %}. You can choose any repository name, or use the following `hello-world-composite-action` example. You can add these files after your project has been pushed to {% data variables.product.product_name %}. For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."
1. From your terminal, change directories into your new repository.
```shell
cd hello-world-composite-action
```
2. In the `hello-world-composite-action` repository, create a new file called `goodbye.sh`, and add the following example code:
```bash
echo "Goodbye"
```
3. From your terminal, make `goodbye.sh` executable.
```shell
chmod +x goodbye.sh
```
1. From your terminal, check in your `goodbye.sh` file.
```shell
git add goodbye.sh
git commit -m "Add goodbye script"
git push
```
## Creating an action metadata file
1. In the `hello-world-composite-action` repository, create a new file called `action.yml` and add the following example code. For more information about this syntax, see "[`runs` for a composite actions](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-actions)".
{% raw %}
**action.yml**
```yaml
name: 'Hello World'
description: 'Greet someone'
inputs:
who-to-greet: # id of input
description: 'Who to greet'
required: true
default: 'World'
outputs:
random-number:
description: "Random number"
value: ${{ steps.random-number-generator.outputs.random-number }}
runs:
using: "composite"
steps:
- run: echo Hello ${{ inputs.who-to-greet }}.
shell: bash
- id: random-number-generator{% endraw %}
{%- ifversion actions-save-state-set-output-envs %}
run: echo "random-number=$(echo $RANDOM)" >> $GITHUB_OUTPUT
{%- else %}
run: echo "::set-output name=random-number::$(echo $RANDOM)"
{%- endif %}{% raw %}
shell: bash
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- run: goodbye.sh
shell: bash
```
{% endraw %}
This file defines the `who-to-greet` input, maps the random generated number to the `random-number` output variable, and runs the `goodbye.sh` script. It also tells the runner how to execute the composite action.
For more information about managing outputs, see "[`outputs` for a composite action](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions)".
For more information about how to use `github.action_path`, see "[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)".
1. From your terminal, check in your `action.yml` file.
```shell
git add action.yml
git commit -m "Add action"
git push
```
1. From your terminal, add a tag. This example uses a tag called `v1`. For more information, see "[About actions](/actions/creating-actions/about-actions#using-release-management-for-actions)."
```shell
git tag -a -m "Description of this release" v1
git push --follow-tags
```
## Testing out your action in a workflow
The following workflow code uses the completed hello world action that you made in "[Creating an action metadata file](/actions/creating-actions/creating-a-composite-action#creating-an-action-metadata-file)".
Copy the workflow code into a `.github/workflows/main.yml` file in another repository, but replace `actions/hello-world-composite-action@v1` with the repository and tag you created. You can also replace the `who-to-greet` input with your name.
**.github/workflows/main.yml**
```yaml
on: [push]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
- uses: {% data reusables.actions.action-checkout %}
- id: foo
uses: actions/hello-world-composite-action@v1
with:
who-to-greet: 'Mona the Octocat'
- run: echo random-number {% raw %}${{ steps.foo.outputs.random-number }}{% endraw %}
shell: bash
```
From your repository, click the **Actions** tab, and select the latest workflow run. The output should include: "Hello Mona the Octocat", the result of the "Goodbye" script, and a random number.

View File

@@ -0,0 +1,252 @@
---
title: Creating a Docker container action
shortTitle: Create a Docker container action
intro: 'This guide shows you the minimal steps required to build a Docker container action. '
redirect_from:
- /articles/creating-a-docker-container-action
- /github/automating-your-workflow-with-github-actions/creating-a-docker-container-action
- /actions/automating-your-workflow-with-github-actions/creating-a-docker-container-action
- /actions/building-actions/creating-a-docker-container-action
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- Action development
- Docker
---
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## Introduction
In this guide, you'll learn about the basic components needed to create and use a packaged Docker container action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" in the logs or "Hello [who-to-greet]" if you provide a custom name.
Once you complete this project, you should understand how to build your own Docker container action and test it in a workflow.
{% data reusables.actions.self-hosted-runner-reqs-docker %}
{% data reusables.actions.context-injection-warning %}
## Prerequisites
You may find it helpful to have a basic understanding of {% data variables.product.prodname_actions %} environment variables and the Docker container filesystem:
- "[Using environment variables](/actions/automating-your-workflow-with-github-actions/using-environment-variables)"
{% ifversion ghae %}
- "[Docker container filesystem](/actions/using-github-hosted-runners/about-ae-hosted-runners#docker-container-filesystem)."
{% else %}
- "[About {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners#docker-container-filesystem)"
{% endif %}
Before you begin, you'll need to create a {% data variables.product.prodname_dotcom %} repository.
1. Create a new repository on {% data variables.location.product_location %}. You can choose any repository name or use "hello-world-docker-action" like this example. For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."
1. From your terminal, change directories into your new repository.
```shell{:copy}
cd hello-world-docker-action
```
## Creating a Dockerfile
In your new `hello-world-docker-action` directory, create a new `Dockerfile` file. Make sure that your filename is capitalized correctly (use a capital `D` but not a capital `f`) if you're having issues. For more information, see "[Dockerfile support for {% data variables.product.prodname_actions %}](/actions/creating-actions/dockerfile-support-for-github-actions)."
**Dockerfile**
```Dockerfile{:copy}
# Container image that runs your code
FROM alpine:3.10
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]
```
## Creating an action metadata file
Create a new `action.yml` file in the `hello-world-docker-action` directory you created above. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions)."
{% raw %}
**action.yml**
```yaml{:copy}
# action.yml
name: 'Hello World'
description: 'Greet someone and record the time'
inputs:
who-to-greet: # id of input
description: 'Who to greet'
required: true
default: 'World'
outputs:
time: # id of output
description: 'The time we greeted you'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.who-to-greet }}
```
{% endraw %}
This metadata defines one `who-to-greet` input and one `time` output parameter. To pass inputs to the Docker container, you should declare the input using `inputs` and pass the input in the `args` keyword. Everything you include in `args` is passed to the container, but for better discoverability for users of your action, we recommended using inputs.
{% data variables.product.prodname_dotcom %} will build an image from your `Dockerfile`, and run commands in a new container using this image.
## Writing the action code
You can choose any base Docker image and, therefore, any language for your action. The following shell script example uses the `who-to-greet` input variable to print "Hello [who-to-greet]" in the log file.
Next, the script gets the current time and sets it as an output variable that actions running later in a job can use. In order for {% data variables.product.prodname_dotcom %} to recognize output variables, you must {% ifversion actions-save-state-set-output-envs %}write them to the `$GITHUB_OUTPUT` environment file: `echo "<output name>=<value>" >> $GITHUB_OUTPUT`{% else %}use a workflow command in a specific syntax: `echo "::set-output name=<output name>::<value>"`{% endif %}. For more information, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)."
1. Create a new `entrypoint.sh` file in the `hello-world-docker-action` directory.
1. Add the following code to your `entrypoint.sh` file.
**entrypoint.sh**
```shell{:copy}
#!/bin/sh -l
echo "Hello $1"
time=$(date)
{%- ifversion actions-save-state-set-output-envs %}
echo "time=$time" >> $GITHUB_OUTPUT
{%- else %}
echo "::set-output name=time::$time"
{%- endif %}
```
If `entrypoint.sh` executes without any errors, the action's status is set to `success`. You can also explicitly set exit codes in your action's code to provide an action's status. For more information, see "[Setting exit codes for actions](/actions/creating-actions/setting-exit-codes-for-actions)."
1. Make your `entrypoint.sh` file executable. Git provides a way to explicitly change the permission mode of a file so that it doesnt get reset every time there is a clone/fork.
```shell{:copy}
$ git update-index --chmod=+x entrypoint.sh
```
1. Optionally, to check the permission mode of the file in the git index, run the following command.
```shell{:copy}
$ git ls-files --stage entrypoint.sh
```
An output like `100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 entrypoint.sh` means the file has the executable permission. In this example, `755` denotes the executable permission.
## Creating a README
To let people know how to use your action, you can create a README file. A README is most helpful when you plan to share your action publicly, but is also a great way to remind you or your team how to use the action.
In your `hello-world-docker-action` directory, create a `README.md` file that specifies the following information:
- A detailed description of what the action does.
- Required input and output arguments.
- Optional input and output arguments.
- Secrets the action uses.
- Environment variables the action uses.
- An example of how to use your action in a workflow.
**README.md**
```markdown{:copy}
# Hello world docker action
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
## Inputs
## `who-to-greet`
**Required** The name of the person to greet. Default `"World"`.
## Outputs
## `time`
The time we greeted you.
## Example usage
uses: actions/hello-world-docker-action@{% ifversion actions-save-state-set-output-envs %}v2{% else %}v1{% endif %}
with:
who-to-greet: 'Mona the Octocat'
```
## Commit, tag, and push your action to {% data variables.product.product_name %}
From your terminal, commit your `action.yml`, `entrypoint.sh`, `Dockerfile`, and `README.md` files.
It's best practice to also add a version tag for releases of your action. For more information on versioning your action, see "[About actions](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)."
```shell{:copy}
git add action.yml entrypoint.sh Dockerfile README.md
git commit -m "My first action is ready"
git tag -a -m "My first action release" v1
git push --follow-tags
```
## Testing out your action in a workflow
Now you're ready to test your action out in a workflow. When an action is in a private repository, the action can only be used in workflows in the same repository. Public actions can be used by workflows in any repository.
{% data reusables.actions.enterprise-marketplace-actions %}
### Example using a public action
The following workflow code uses the completed _hello world_ action in the public [`actions/hello-world-docker-action`](https://github.com/actions/hello-world-docker-action) repository. Copy the following workflow example code into a `.github/workflows/main.yml` file, but replace the `actions/hello-world-docker-action` with your repository and action name. You can also replace the `who-to-greet` input with your name. {% ifversion fpt or ghec %}Public actions can be used even if they're not published to {% data variables.product.prodname_marketplace %}. For more information, see "[Publishing an action](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)." {% endif %}
**.github/workflows/main.yml**
```yaml{:copy}
on: [push]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
- name: Hello world action step
id: hello
uses: actions/hello-world-docker-action{% ifversion actions-save-state-set-output-envs %}v2{% else %}v1{% endif %}
with:
who-to-greet: 'Mona the Octocat'
# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was {% raw %}${{ steps.hello.outputs.time }}"{% endraw %}
```
### Example using a private action
Copy the following example workflow code into a `.github/workflows/main.yml` file in your action's repository. You can also replace the `who-to-greet` input with your name. {% ifversion fpt or ghec %}This private action can't be published to {% data variables.product.prodname_marketplace %}, and can only be used in this repository.{% endif %}
**.github/workflows/main.yml**
```yaml{:copy}
on: [push]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout
uses: {% data reusables.actions.action-checkout %}
- name: Hello world action step
uses: ./ # Uses an action in the root directory
id: hello
with:
who-to-greet: 'Mona the Octocat'
# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was {% raw %}${{ steps.hello.outputs.time }}"{% endraw %}
```
From your repository, click the **Actions** tab, and select the latest workflow run. Under **Jobs** or in the visualization graph, click **A job to say hello**. You should see "Hello Mona the Octocat" or the name you used for the `who-to-greet` input and the timestamp printed in the log.
![A screenshot of using your action in a workflow](/assets/images/help/repository/docker-action-workflow-run-updated.png)

View File

@@ -0,0 +1,273 @@
---
title: Creating a JavaScript action
shortTitle: Create a JavaScript action
intro: 'In this guide, you''ll learn how to build a JavaScript action using the actions toolkit.'
redirect_from:
- /articles/creating-a-javascript-action
- /github/automating-your-workflow-with-github-actions/creating-a-javascript-action
- /actions/automating-your-workflow-with-github-actions/creating-a-javascript-action
- /actions/building-actions/creating-a-javascript-action
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: tutorial
topics:
- Action development
- JavaScript
---
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## Introduction
In this guide, you'll learn about the basic components needed to create and use a packaged JavaScript action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" in the logs or "Hello [who-to-greet]" if you provide a custom name.
This guide uses the {% data variables.product.prodname_actions %} Toolkit Node.js module to speed up development. For more information, see the [actions/toolkit](https://github.com/actions/toolkit) repository.
Once you complete this project, you should understand how to build your own JavaScript action and test it in a workflow.
{% data reusables.actions.pure-javascript %}
{% data reusables.actions.context-injection-warning %}
## Prerequisites
Before you begin, you'll need to download Node.js and create a public {% data variables.product.prodname_dotcom %} repository.
1. Download and install Node.js {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}16.x{% else %}12.x{% endif %}, which includes npm.
{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}https://nodejs.org/en/download/{% else %}https://nodejs.org/en/download/releases/{% endif %}
1. Create a new public repository on {% data variables.location.product_location %} and call it "hello-world-javascript-action". For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."
1. From your terminal, change directories into your new repository.
```shell{:copy}
cd hello-world-javascript-action
```
1. From your terminal, initialize the directory with npm to generate a `package.json` file.
```shell{:copy}
npm init -y
```
## Creating an action metadata file
Create a new file named `action.yml` in the `hello-world-javascript-action` directory with the following example code. For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions)."
```yaml{:copy}
name: 'Hello World'
description: 'Greet someone and record the time'
inputs:
who-to-greet: # id of input
description: 'Who to greet'
required: true
default: 'World'
outputs:
time: # id of output
description: 'The time we greeted you'
runs:
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
main: 'index.js'
```
This file defines the `who-to-greet` input and `time` output. It also tells the action runner how to start running this JavaScript action.
## Adding actions toolkit packages
The actions toolkit is a collection of Node.js packages that allow you to quickly build JavaScript actions with more consistency.
The toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package provides an interface to the workflow commands, input and output variables, exit statuses, and debug messages.
The toolkit also offers a [`@actions/github`](https://github.com/actions/toolkit/tree/main/packages/github) package that returns an authenticated Octokit REST client and access to GitHub Actions contexts.
The toolkit offers more than the `core` and `github` packages. For more information, see the [actions/toolkit](https://github.com/actions/toolkit) repository.
At your terminal, install the actions toolkit `core` and `github` packages.
```shell{:copy}
npm install @actions/core
npm install @actions/github
```
Now you should see a `node_modules` directory with the modules you just installed and a `package-lock.json` file with the installed module dependencies and the versions of each installed module.
## Writing the action code
This action uses the toolkit to get the `who-to-greet` input variable required in the action's metadata file and prints "Hello [who-to-greet]" in a debug message in the log. Next, the script gets the current time and sets it as an output variable that actions running later in a job can use.
GitHub Actions provide context information about the webhook event, Git refs, workflow, action, and the person who triggered the workflow. To access the context information, you can use the `github` package. The action you'll write will print the webhook event payload to the log.
Add a new file called `index.js`, with the following code.
{% raw %}
```javascript{:copy}
const core = require('@actions/core');
const github = require('@actions/github');
try {
// `who-to-greet` input defined in action metadata file
const nameToGreet = core.getInput('who-to-greet');
console.log(`Hello ${nameToGreet}!`);
const time = (new Date()).toTimeString();
core.setOutput("time", time);
// Get the JSON webhook payload for the event that triggered the workflow
const payload = JSON.stringify(github.context.payload, undefined, 2)
console.log(`The event payload: ${payload}`);
} catch (error) {
core.setFailed(error.message);
}
```
{% endraw %}
If an error is thrown in the above `index.js` example, `core.setFailed(error.message);` uses the actions toolkit [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) package to log a message and set a failing exit code. For more information, see "[Setting exit codes for actions](/actions/creating-actions/setting-exit-codes-for-actions)."
## Creating a README
To let people know how to use your action, you can create a README file. A README is most helpful when you plan to share your action publicly, but is also a great way to remind you or your team how to use the action.
In your `hello-world-javascript-action` directory, create a `README.md` file that specifies the following information:
- A detailed description of what the action does.
- Required input and output arguments.
- Optional input and output arguments.
- Secrets the action uses.
- Environment variables the action uses.
- An example of how to use your action in a workflow.
````markdown{:copy}
# Hello world javascript action
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
## Inputs
### `who-to-greet`
**Required** The name of the person to greet. Default `"World"`.
## Outputs
### `time`
The time we greeted you.
## Example usage
```yaml
uses: actions/hello-world-javascript-action@v1.1
with:
who-to-greet: 'Mona the Octocat'
```
````
## Commit, tag, and push your action to GitHub
{% data variables.product.product_name %} downloads each action run in a workflow during runtime and executes it as a complete package of code before you can use workflow commands like `run` to interact with the runner machine. This means you must include any package dependencies required to run the JavaScript code. You'll need to check in the toolkit `core` and `github` packages to your action's repository.
From your terminal, commit your `action.yml`, `index.js`, `node_modules`, `package.json`, `package-lock.json`, and `README.md` files. If you added a `.gitignore` file that lists `node_modules`, you'll need to remove that line to commit the `node_modules` directory.
It's best practice to also add a version tag for releases of your action. For more information on versioning your action, see "[About actions](/actions/automating-your-workflow-with-github-actions/about-actions#using-release-management-for-actions)."
```shell{:copy}
git add action.yml index.js node_modules/* package.json package-lock.json README.md
git commit -m "My first action is ready"
git tag -a -m "My first action release" v1.1
git push --follow-tags
```
Checking in your `node_modules` directory can cause problems. As an alternative, you can use a tool called [`@vercel/ncc`](https://github.com/vercel/ncc) to compile your code and modules into one file used for distribution.
1. Install `vercel/ncc` by running this command in your terminal.
`npm i -g @vercel/ncc`
1. Compile your `index.js` file.
`ncc build index.js --license licenses.txt`
You'll see a new `dist/index.js` file with your code and the compiled modules.
You will also see an accompanying `dist/licenses.txt` file containing all the licenses of the `node_modules` you are using.
1. Change the `main` keyword in your `action.yml` file to use the new `dist/index.js` file.
`main: 'dist/index.js'`
1. If you already checked in your `node_modules` directory, remove it.
`rm -rf node_modules/*`
1. From your terminal, commit the updates to your `action.yml`, `dist/index.js`, and `node_modules` files.
```shell{:copy}
git add action.yml dist/index.js node_modules/*
git commit -m "Use vercel/ncc"
git tag -a -m "My first action release" v1.1
git push --follow-tags
```
## Testing out your action in a workflow
Now you're ready to test your action out in a workflow. When an action is in a private repository, the action can only be used in workflows in the same repository. Public actions can be used by workflows in any repository.
{% data reusables.actions.enterprise-marketplace-actions %}
### Example using a public action
This example demonstrates how your new public action can be run from within an external repository.
Copy the following YAML into a new file at `.github/workflows/main.yml`, and update the `uses: octocat/hello-world-javascript-action@v1.1` line with your username and the name of the public repository you created above. You can also replace the `who-to-greet` input with your name.
{% raw %}
```yaml{:copy}
on: [push]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
- name: Hello world action step
id: hello
uses: octocat/hello-world-javascript-action@v1.1
with:
who-to-greet: 'Mona the Octocat'
# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was ${{ steps.hello.outputs.time }}"
```
{% endraw %}
When this workflow is triggered, the runner will download the `hello-world-javascript-action` action from your public repository and then execute it.
### Example using a private action
Copy the workflow code into a `.github/workflows/main.yml` file in your action's repository. You can also replace the `who-to-greet` input with your name.
**.github/workflows/main.yml**
```yaml{:copy}
on: [push]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout
uses: {% data reusables.actions.action-checkout %}
- name: Hello world action step
uses: ./ # Uses an action in the root directory
id: hello
with:
who-to-greet: 'Mona the Octocat'
# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was {% raw %}${{ steps.hello.outputs.time }}{% endraw %}"
```
From your repository, click the **Actions** tab, and select the latest workflow run. Under **Jobs** or in the visualization graph, click **A job to say hello**. You should see "Hello Mona the Octocat" or the name you used for the `who-to-greet` input and the timestamp printed in the log.
![A screenshot of using your action in a workflow](/assets/images/help/repository/javascript-action-workflow-run-updated-2.png)

View File

@@ -0,0 +1,77 @@
---
title: Разработка стороннего действия CLI
shortTitle: CLI setup action
intro: 'Узнайте, как разработать действие для настройки интерфейса командной строки в средствах выполнения тестов {% data variables.product.prodname_actions %}.'
redirect_from: []
versions:
fpt: '*'
ghec: '*'
type: tutorial
topics:
- Actions
ms.openlocfilehash: c839faa63efd0f8b7f5ab78a81107d27ab93e1c4
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '145092538'
---
## Введение
Вы можете написать действие, чтобы предоставить пользователям возможность доступа к вашим серверам через настроенную среду CLI в средствах выполнения {% data variables.product.prodname_actions %}.
Действие должно отвечать следующим требованиям:
- позволять пользователям легко указывать версию интерфейса CLI для установки;
- поддерживать несколько операционных систем;
- эффективно выполняться для сведения к минимуму затрат времени и ресурсов;
- работать в размещенных в {% data variables.product.product_name %} и локальных средствах выполнения;
- по возможности использовать инструменты сообщества.
В этой статье показано, как написать действие, которое получает определенную версию интерфейса CLI, устанавливает ее, добавляет ее по определенному пути и (необязательно) кэширует ее. Действия такого типа (которые устанавливают средство) часто называются `setup-$TOOL`.
## Предварительные требования
У вас должно быть представление о написании пользовательских действий. Дополнительные сведения см. в разделе [Сведения о настраиваемых действиях](/actions/creating-actions/about-custom-actions). Более подробное руководство по написанию пользовательского действия см. в разделе [Создание действия JavaScript](/actions/creating-actions/creating-a-javascript-action).
## Пример
В приведенном ниже скрипте показано, как получить указанную пользователем версию в качестве входных данных, скачать и извлечь эту версию интерфейса CLI, а затем добавить ее по пути.
{% data variables.product.prodname_dotcom %} предоставляет [`actions/toolkit`](https://github.com/actions/toolkit), набор пакетов, помогающих создавать действия. В этом примере используются пакеты [`actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) и [`actions/tool-cache`](https://github.com/actions/toolkit/tree/main/packages/tool-cache).
{% raw %}
```javascript{:copy}
const core = require('@actions/core');
const tc = require('@actions/tool-cache');
async function setup() {
// Get version of tool to be installed
const version = core.getInput('version');
// Download the specific version of the tool, e.g. as a tarball
const pathToTarball = await tc.downloadTool(getDownloadURL());
// Extract the tarball onto the runner
const pathToCLI = await tc.extractTar(pathToTarball);
// Expose the tool by adding it to the PATH
core.addPath(pathToCLI)
}
module.exports = setup
```
{% endraw %}
Чтобы использовать этот скрипт, замените `getDownloadURL` на функцию, которая скачивает интерфейс CLI. Вам также потребуется создать файл метаданных действия (`action.yml`), который принимает входной аргумент `version` и запускает скрипт. Полные сведения о создании действия см. в разделе [Создание действия JavaScript](/actions/creating-actions/creating-a-javascript-action).
Полный пример настройки этого действия см. в [example-setup-gh](https://github.com/github-developer/example-setup-gh).
## Дополнительные материалы
Этот шаблон применяется в нескольких действиях. Дополнительные примеры:
* [`ruby/setup-ruby`](https://github.com/ruby/setup-ruby)
* [`google-github-actions/setup-gcloud`](https://github.com/google-github-actions/setup-gcloud)
* [`hashicorp/setup-terraform`](https://github.com/hashicorp/setup-terraform)

View File

@@ -0,0 +1,116 @@
---
title: Поддержка Dockerfile для GitHub Actions
shortTitle: Dockerfile support
intro: 'При создании `Dockerfile` для действия контейнера Docker следует знать, как отдельные инструкции Docker взаимодействуют с GitHub Actions и файлом метаданных действия.'
redirect_from:
- /actions/building-actions/dockerfile-support-for-github-actions
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: reference
ms.openlocfilehash: 6e061e479f4988398cbdc92114e387a3055734af
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/05/2022
ms.locfileid: '145088645'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Инструкции по Dockerfile
`Dockerfile` содержит инструкции и аргументы, определяющие содержимое и реакцию на событие запуска контейнера Docker. Дополнительные сведения об инструкциях, поддерживаемых Docker, см. в статье [Справочник по Dockerfile](https://docs.docker.com/engine/reference/builder/) в документации по Docker.
## Инструкции и переопределения Dockerfile
Некоторые инструкции Docker взаимодействуют с GitHub Actions, а файл метаданных действия может переопределять некоторые инструкции Docker. Обязательно изучите то, как Dockerfile взаимодействует с {% data variables.product.prodname_actions %}, чтобы предотвратить непредвиденную реакцию на событие.
### Пользователь
Действия Docker должен выполнять пользователь Docker по умолчанию (корневой). Не используйте инструкцию `USER` в `Dockerfile`, поскольку вы не сможете получить доступ к `GITHUB_WORKSPACE`. Дополнительные сведения см. в статье [Использование переменных среды](/actions/configuring-and-managing-workflows/using-environment-variables) и в [справочнике USER](https://docs.docker.com/engine/reference/builder/#user) в документации по Docker.
### FROM
Первой инструкцией в `Dockerfile` должна быть `FROM`, выбирающая базовый образ Docker. Дополнительные сведения см. в [справочнике FROM](https://docs.docker.com/engine/reference/builder/#from) в документации по Docker.
Далее приведены некоторые рекомендации по настройке аргумента `FROM`:
- Рекомендуется использовать официальные образы Docker. Например, `python` или `ruby`.
- Используйте тег версии (если он существует), предпочтительно с основным номером версии. Например, используйте `node:10` вместо `node:latest`.
- Рекомендуется использовать образы Docker, основанные на операционной системе [Debian](https://www.debian.org/).
### WORKDIR
{% data variables.product.product_name %} задает путь к рабочей папке в переменной среды `GITHUB_WORKSPACE`. Инструкцию `WORKDIR` не рекомендуется использовать в `Dockerfile`. Перед выполнением действия {% data variables.product.product_name %} подключит каталог `GITHUB_WORKSPACE` поверх всего, что находилось в этом расположении в образе Docker и задаст `GITHUB_WORKSPACE` в качестве рабочей папки. Дополнительные сведения см. в статье [Использование переменных среды](/actions/configuring-and-managing-workflows/using-environment-variables) и в [справочнике WORKDIR](https://docs.docker.com/engine/reference/builder/#workdir) в документации по Docker.
### ENTRYPOINT
Если вы укажите `entrypoint` в файле метаданных действия, он переопределит `ENTRYPOINT`, указанный в файле `Dockerfile`. Дополнительные сведения см. в разделе [Синтаксис метаданных для {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions/#runsentrypoint).
Инструкция Docker `ENTRYPOINT` имеет форму _оболочки_ и форму _exec_. В документации по `ENTRYPOINT` Docker рекомендуется использовать форму _exec_ инструкции `ENTRYPOINT`. Дополнительные сведения о форме _exec_ и форме _оболочки_ см. в [справочнике ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) в документации по Docker.
Не следует применять `WORKDIR` для указания точки входа в Dockerfile. Вместо этого воспользуйтесь абсолютным путем. Дополнительные сведения см. в статье о [WORKDIR](#workdir).
Если вы настроите контейнер для использования формы _exec_ инструкции `ENTRYPOINT`, `args`, настроенный в файле метаданных действия, не будет выполняться в командной оболочке. Если `args` действия содержит переменную среды, эта переменная не будет заменена. Например, при использовании следующего формата _exec_ вместо значения, хранящегося в `$GITHUB_SHA`, будет напечатано `"$GITHUB_SHA"`.
```dockerfile
ENTRYPOINT ["echo $GITHUB_SHA"]
```
Если вам нужно выполнить подстановку переменной, используйте форму _оболочки_ или выполните оболочку напрямую. Например, используя следующий формат _exec_, можно выполнить оболочку для печати значения, хранящегося в переменной среды `GITHUB_SHA`.
```dockerfile
ENTRYPOINT ["sh", "-c", "echo $GITHUB_SHA"]
```
Чтобы предоставить `args`, определенный в файле метаданных действия, контейнеру Docker, который использует форму _exec_ в `ENTRYPOINT`, рекомендуется создать сценарий оболочки под именем `entrypoint.sh`, вызываемый из инструкции `ENTRYPOINT`:
#### Пример *Dockerfile*
```dockerfile
# Container image that runs your code
FROM debian:9.5-slim
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
# Executes `entrypoint.sh` when the Docker container starts up
ENTRYPOINT ["/entrypoint.sh"]
```
#### Пример файла *entrypoint.sh*
Используя приведенный выше пример Dockerfile, {% data variables.product.product_name %} отправит `args`, настроенный в файле метаданных действия в качестве аргументов, в `entrypoint.sh`. Добавьте `#!/bin/sh` [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) в начало файла `entrypoint.sh`, чтобы явно использовать оболочку, соответствующую [POSIX](https://en.wikipedia.org/wiki/POSIX).
``` sh
#!/bin/sh
# `$*` expands the `args` supplied in an `array` individually
# or splits `args` in a string separated by whitespace.
sh -c "echo $*"
```
Ваш код должен быть исполняемым. Прежде чем использовать файл `entrypoint.sh` в рабочем процессе, убедитесь, что он имеет разрешения `execute`. Вы можете изменить разрешение в терминале с помощью следующей команды:
``` sh
chmod +x entrypoint.sh
```
Если сценарий оболочки `ENTRYPOINT` не является исполняемым, вы получите следующую ошибку:
``` sh
Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/entrypoint.sh\": permission denied": unknown
```
### CMD
Если вы определите `args` в файле метаданных действия, `args` переопределит инструкцию `CMD`, указанную в `Dockerfile`. Дополнительные сведения см. в статье [Синтаксис метаданных для {% data variables.product.prodname_actions %}](/actions/creating-actions/metadata-syntax-for-github-actions#runsargs).
При использовании `CMD` в своем `Dockerfile` следуйте приведенным ниже рекомендациям:
{% data reusables.actions.dockerfile-guidelines %}
## Поддерживаемые возможности Linux
{% data variables.product.prodname_actions %} поддерживает возможности Linux по умолчанию, которые поддерживает Docker. Возможности нельзя добавлять или удалять. Дополнительные сведения о возможностях Linux по умолчанию, которые поддерживает Docker, см. в статье [Привилегии среды выполнения и возможности Linux](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) в документации по Docker. Дополнительные сведения о возможностях Linux см. в статье [Общие сведения о возможностях Linux](http://man7.org/linux/man-pages/man7/capabilities.7.html) на страницах руководства Linux.

View File

@@ -0,0 +1,34 @@
---
title: Создание действий
intro: 'Вы можете создавать собственные действия, использовать и настраивать действия, которые предоставляются сообществом {% data variables.product.prodname_dotcom %} или записывать созданные действия и делиться ими.'
redirect_from:
- /articles/building-actions
- /github/automating-your-workflow-with-github-actions/building-actions
- /actions/automating-your-workflow-with-github-actions/building-actions
- /actions/building-actions
- /articles/creating-a-github-action
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
children:
- /about-custom-actions
- /creating-a-docker-container-action
- /creating-a-javascript-action
- /creating-a-composite-action
- /metadata-syntax-for-github-actions
- /dockerfile-support-for-github-actions
- /setting-exit-codes-for-actions
- /publishing-actions-in-github-marketplace
- /sharing-actions-and-workflows-with-your-enterprise
- /releasing-and-maintaining-actions
- /developing-a-third-party-cli-action
ms.openlocfilehash: b60bd1031bc7e9958a146cbf9755a000679edff3
ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/10/2022
ms.locfileid: '147880624'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -0,0 +1,905 @@
---
title: Metadata syntax for GitHub Actions
shortTitle: Metadata syntax
intro: You can create actions to perform tasks in your repository. Actions require a metadata file that uses YAML syntax.
redirect_from:
- /articles/metadata-syntax-for-github-actions
- /github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions
- /actions/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions
- /actions/building-actions/metadata-syntax-for-github-actions
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: reference
miniTocMaxHeadingLevel: 4
---
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## About YAML syntax for {% data variables.product.prodname_actions %}
All actions require a metadata file. The metadata filename must be either `action.yml` or `action.yaml`. The data in the metadata file defines the inputs, outputs, and runs configuration for your action.
Action metadata files use YAML syntax. If you're new to YAML, you can read "[Learn YAML in five minutes](https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes)."
## `name`
**Required** The name of your action. {% data variables.product.prodname_dotcom %} displays the `name` in the **Actions** tab to help visually identify actions in each job.
## `author`
**Optional** The name of the action's author.
## `description`
**Required** A short description of the action.
## `inputs`
**Optional** Input parameters allow you to specify data that the action expects to use during runtime. {% data variables.product.prodname_dotcom %} stores input parameters as environment variables. Input ids with uppercase letters are converted to lowercase during runtime. We recommended using lowercase input ids.
### Example: Specifying inputs
This example configures two inputs: numOctocats and octocatEyeColor. The numOctocats input is not required and will default to a value of '1'. The octocatEyeColor input is required and has no default value. Workflow files that use this action must use the `with` keyword to set an input value for octocatEyeColor. For more information about the `with` syntax, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions/#jobsjob_idstepswith)."
```yaml
inputs:
numOctocats:
description: 'Number of Octocats'
required: false
default: '1'
octocatEyeColor:
description: 'Eye color of the Octocats'
required: true
```
When you specify an input in a workflow file or use a default input value, {% data variables.product.prodname_dotcom %} creates an environment variable for the input with the name `INPUT_<VARIABLE_NAME>`. The environment variable created converts input names to uppercase letters and replaces spaces with `_` characters.
If the action is written using a [composite](/actions/creating-actions/creating-a-composite-action), then it will not automatically get `INPUT_<VARIABLE_NAME>`. If the conversion doesn't occur, you can change these inputs manually.
To access the environment variable in a Docker container action, you must pass the input using the `args` keyword in the action metadata file. For more information about the action metadata file for Docker container actions, see "[Creating a Docker container action](/articles/creating-a-docker-container-action#creating-an-action-metadata-file)."
For example, if a workflow defined the `numOctocats` and `octocatEyeColor` inputs, the action code could read the values of the inputs using the `INPUT_NUMOCTOCATS` and `INPUT_OCTOCATEYECOLOR` environment variables.
### `inputs.<input_id>`
**Required** A `string` identifier to associate with the input. The value of `<input_id>` is a map of the input's metadata. The `<input_id>` must be a unique identifier within the `inputs` object. The `<input_id>` must start with a letter or `_` and contain only alphanumeric characters, `-`, or `_`.
### `inputs.<input_id>.description`
**Required** A `string` description of the input parameter.
### `inputs.<input_id>.required`
**Optional** A `boolean` to indicate whether the action requires the input parameter. Set to `true` when the parameter is required.
### `inputs.<input_id>.default`
**Optional** A `string` representing the default value. The default value is used when an input parameter isn't specified in a workflow file.
### `inputs.<input_id>.deprecationMessage`
**Optional** If the input parameter is used, this `string` is logged as a warning message. You can use this warning to notify users that the input is deprecated and mention any alternatives.
## `outputs` for Docker container and JavaScript actions
**Optional** Output parameters allow you to declare data that an action sets. Actions that run later in a workflow can use the output data set in previously run actions. For example, if you had an action that performed the addition of two inputs (x + y = z), the action could output the sum (z) for other actions to use as an input.
{% data reusables.actions.output-limitations %}
If you don't declare an output in your action metadata file, you can still set outputs and use them in a workflow. For more information on setting outputs in an action, see "[Workflow commands for {% data variables.product.prodname_actions %}](/actions/reference/workflow-commands-for-github-actions/#setting-an-output-parameter)."
### Example: Declaring outputs for Docker container and JavaScript actions
```yaml
outputs:
sum: # id of the output
description: 'The sum of the inputs'
```
### `outputs.<output_id>`
**Required** A `string` identifier to associate with the output. The value of `<output_id>` is a map of the output's metadata. The `<output_id>` must be a unique identifier within the `outputs` object. The `<output_id>` must start with a letter or `_` and contain only alphanumeric characters, `-`, or `_`.
### `outputs.<output_id>.description`
**Required** A `string` description of the output parameter.
## `outputs` for composite actions
**Optional** `outputs` use the same parameters as `outputs.<output_id>` and `outputs.<output_id>.description` (see "[`outputs` for Docker container and JavaScript actions](#outputs-for-docker-container-and-javascript-actions)"), but also includes the `value` token.
{% data reusables.actions.output-limitations %}
### Example: Declaring outputs for composite actions
{% raw %}
```yaml
outputs:
random-number:
description: "Random number"
value: ${{ steps.random-number-generator.outputs.random-id }}
runs:
using: "composite"
steps:
- id: random-number-generator{% endraw %}
{%- ifversion actions-save-state-set-output-envs %}
run: echo "random-id=$(echo $RANDOM)" >> $GITHUB_OUTPUT
{%- else %}
run: echo "::set-output name=random-id::$(echo $RANDOM)"
{%- endif %}{% raw %}
shell: bash
```
{% endraw %}
### `outputs.<output_id>.value`
**Required** The value that the output parameter will be mapped to. You can set this to a `string` or an expression with context. For example, you can use the `steps` context to set the `value` of an output to the output value of a step.
For more information on how to use context syntax, see "[Contexts](/actions/learn-github-actions/contexts)."
## `runs`
**Required** Specifies whether this is a JavaScript action, a composite action, or a Docker container action and how the action is executed.
## `runs` for JavaScript actions
**Required** Configures the path to the action's code and the runtime used to execute the code.
### Example: Using Node.js {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}v16{% else %}v12{% endif %}
```yaml
runs:
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
main: 'main.js'
```
### `runs.using`
**Required** The runtime used to execute the code specified in [`main`](#runsmain).
- Use `node12` for Node.js v12.{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}
- Use `node16` for Node.js v16.{% endif %}
### `runs.main`
**Required** The file that contains your action code. The runtime specified in [`using`](#runsusing) executes this file.
### `runs.pre`
**Optional** Allows you to run a script at the start of a job, before the `main:` action begins. For example, you can use `pre:` to run a prerequisite setup script. The runtime specified with the [`using`](#runsusing) syntax will execute this file. The `pre:` action always runs by default but you can override this using [`runs.pre-if`](#runspre-if).
In this example, the `pre:` action runs a script called `setup.js`:
```yaml
runs:
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
pre: 'setup.js'
main: 'index.js'
post: 'cleanup.js'
```
### `runs.pre-if`
**Optional** Allows you to define conditions for the `pre:` action execution. The `pre:` action will only run if the conditions in `pre-if` are met. If not set, then `pre-if` defaults to `always()`. In `pre-if`, status check functions evaluate against the job's status, not the action's own status.
Note that the `step` context is unavailable, as no steps have run yet.
In this example, `cleanup.js` only runs on Linux-based runners:
```yaml
pre: 'cleanup.js'
pre-if: runner.os == 'linux'
```
### `runs.post`
**Optional** Allows you to run a script at the end of a job, once the `main:` action has completed. For example, you can use `post:` to terminate certain processes or remove unneeded files. The runtime specified with the [`using`](#runsusing) syntax will execute this file.
In this example, the `post:` action runs a script called `cleanup.js`:
```yaml
runs:
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
main: 'index.js'
post: 'cleanup.js'
```
The `post:` action always runs by default but you can override this using `post-if`.
### `runs.post-if`
**Optional** Allows you to define conditions for the `post:` action execution. The `post:` action will only run if the conditions in `post-if` are met. If not set, then `post-if` defaults to `always()`. In `post-if`, status check functions evaluate against the job's status, not the action's own status.
For example, this `cleanup.js` will only run on Linux-based runners:
```yaml
post: 'cleanup.js'
post-if: runner.os == 'linux'
```
## `runs` for composite actions
**Required** Configures the path to the composite action.
### `runs.using`
**Required** You must set this value to `'composite'`.
### `runs.steps`
**Required** The steps that you plan to run in this action. These can be either `run` steps or `uses` steps.
#### `runs.steps[*].run`
**Optional** The command you want to run. This can be inline or a script in your action repository:
{% raw %}
```yaml
runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/test/script.sh
shell: bash
```
{% endraw %}
Alternatively, you can use `$GITHUB_ACTION_PATH`:
```yaml
runs:
using: "composite"
steps:
- run: $GITHUB_ACTION_PATH/script.sh
shell: bash
```
For more information, see "[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)".
#### `runs.steps[*].shell`
**Optional** The shell where you want to run the command. You can use any of the shells listed [here](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsshell). Required if `run` is set.
{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}
#### `runs.steps[*].if`
**Optional** You can use the `if` conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.
{% data reusables.actions.expression-syntax-if %} For more information, see "[Expressions](/actions/learn-github-actions/expressions)."
**Example: Using contexts**
This step only runs when the event type is a `pull_request` and the event action is `unassigned`.
```yaml
steps:
- run: echo This event is a pull request that had an assignee removed.
if: {% raw %}${{ github.event_name == 'pull_request' && github.event.action == 'unassigned' }}{% endraw %}
```
**Example: Using status check functions**
The `my backup step` only runs when the previous step of a composite action fails. For more information, see "[Expressions](/actions/learn-github-actions/expressions#status-check-functions)."
```yaml
steps:
- name: My first step
uses: octo-org/action-name@main
- name: My backup step
if: {% raw %}${{ failure() }}{% endraw %}
uses: actions/heroku@1.0.0
```
{% endif %}
#### `runs.steps[*].name`
**Optional** The name of the composite step.
#### `runs.steps[*].id`
**Optional** A unique identifier for the step. You can use the `id` to reference the step in contexts. For more information, see "[Contexts](/actions/learn-github-actions/contexts)."
#### `runs.steps[*].env`
**Optional** Sets a `map` of environment variables for only that step. If you want to modify the environment variable stored in the workflow, use `echo "{name}={value}" >> $GITHUB_ENV` in a composite step.
#### `runs.steps[*].working-directory`
**Optional** Specifies the working directory where the command is run.
#### `runs.steps[*].uses`
**Optional** Selects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a [published Docker container image](https://hub.docker.com/).
We strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag number. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.
- Using the commit SHA of a released action version is the safest for stability and security.
- Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.
- Using the default branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.
Some actions require inputs that you must set using the [`with`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepswith) keyword. Review the action's README file to determine the inputs required.
```yaml
runs:
using: "composite"
steps:
# Reference a specific commit
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675
# Reference the major version of a release
- uses: {% data reusables.actions.action-checkout %}
# Reference a specific version
- uses: {% data reusables.actions.action-checkout %}.2.0
# Reference a branch
- uses: actions/checkout@main
# References a subdirectory in a public GitHub repository at a specific branch, ref, or SHA
- uses: actions/aws/ec2@main
# References a local action
- uses: ./.github/actions/my-action
# References a docker public registry action
- uses: docker://gcr.io/cloud-builders/gradle
# Reference a docker image published on docker hub
- uses: docker://alpine:3.8
```
#### `runs.steps[*].with`
**Optional** A `map` of the input parameters defined by the action. Each input parameter is a key/value pair. For more information, see [Example: Specifying inputs](#example-specifying-inputs).
```yaml
runs:
using: "composite"
steps:
- name: My first step
uses: actions/hello_world@main
with:
first_name: Mona
middle_name: The
last_name: Octocat
```
{% ifversion ghes > 3.5 or ghae > 3.5 %}
#### `runs.steps[*].continue-on-error`
**Optional** Prevents the action from failing when a step fails. Set to `true` to allow the action to pass when this step fails.
{% endif %}
## `runs` for Docker container actions
**Required** Configures the image used for the Docker container action.
### Example: Using a Dockerfile in your repository
```yaml
runs:
using: 'docker'
image: 'Dockerfile'
```
### Example: Using public Docker registry container
```yaml
runs:
using: 'docker'
image: 'docker://debian:stretch-slim'
```
### `runs.using`
**Required** You must set this value to `'docker'`.
### `runs.pre-entrypoint`
**Optional** Allows you to run a script before the `entrypoint` action begins. For example, you can use `pre-entrypoint:` to run a prerequisite setup script. {% data variables.product.prodname_actions %} uses `docker run` to launch this action, and runs the script inside a new container that uses the same base image. This means that the runtime state is different from the main `entrypoint` container, and any states you require must be accessed in either the workspace, `HOME`, or as a `STATE_` variable. The `pre-entrypoint:` action always runs by default but you can override this using [`runs.pre-if`](#runspre-if).
The runtime specified with the [`using`](#runsusing) syntax will execute this file.
In this example, the `pre-entrypoint:` action runs a script called `setup.sh`:
```yaml
runs:
using: 'docker'
image: 'Dockerfile'
args:
- 'bzz'
pre-entrypoint: 'setup.sh'
entrypoint: 'main.sh'
```
### `runs.image`
**Required** The Docker image to use as the container to run the action. The value can be the Docker base image name, a local `Dockerfile` in your repository, or a public image in Docker Hub or another registry. To reference a `Dockerfile` local to your repository, the file must be named `Dockerfile` and you must use a path relative to your action metadata file. The `docker` application will execute this file.
### `runs.env`
**Optional** Specifies a key/value map of environment variables to set in the container environment.
### `runs.entrypoint`
**Optional** Overrides the Docker `ENTRYPOINT` in the `Dockerfile`, or sets it if one wasn't already specified. Use `entrypoint` when the `Dockerfile` does not specify an `ENTRYPOINT` or you want to override the `ENTRYPOINT` instruction. If you omit `entrypoint`, the commands you specify in the Docker `ENTRYPOINT` instruction will execute. The Docker `ENTRYPOINT` instruction has a _shell_ form and _exec_ form. The Docker `ENTRYPOINT` documentation recommends using the _exec_ form of the `ENTRYPOINT` instruction.
For more information about how the `entrypoint` executes, see "[Dockerfile support for {% data variables.product.prodname_actions %}](/actions/creating-actions/dockerfile-support-for-github-actions/#entrypoint)."
### `runs.post-entrypoint`
**Optional** Allows you to run a cleanup script once the `runs.entrypoint` action has completed. {% data variables.product.prodname_actions %} uses `docker run` to launch this action. Because {% data variables.product.prodname_actions %} runs the script inside a new container using the same base image, the runtime state is different from the main `entrypoint` container. You can access any state you need in either the workspace, `HOME`, or as a `STATE_` variable. The `post-entrypoint:` action always runs by default but you can override this using [`runs.post-if`](#runspost-if).
```yaml
runs:
using: 'docker'
image: 'Dockerfile'
args:
- 'bzz'
entrypoint: 'main.sh'
post-entrypoint: 'cleanup.sh'
```
### `runs.args`
**Optional** An array of strings that define the inputs for a Docker container. Inputs can include hardcoded strings. {% data variables.product.prodname_dotcom %} passes the `args` to the container's `ENTRYPOINT` when the container starts up.
The `args` are used in place of the `CMD` instruction in a `Dockerfile`. If you use `CMD` in your `Dockerfile`, use the guidelines ordered by preference:
{% data reusables.actions.dockerfile-guidelines %}
If you need to pass environment variables into an action, make sure your action runs a command shell to perform variable substitution. For example, if your `entrypoint` attribute is set to `"sh -c"`, `args` will be run in a command shell. Alternatively, if your `Dockerfile` uses an `ENTRYPOINT` to run the same command (`"sh -c"`), `args` will execute in a command shell.
For more information about using the `CMD` instruction with {% data variables.product.prodname_actions %}, see "[Dockerfile support for {% data variables.product.prodname_actions %}](/actions/creating-actions/dockerfile-support-for-github-actions/#cmd)."
#### Example: Defining arguments for the Docker container
{% raw %}
```yaml
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.greeting }}
- 'foo'
- 'bar'
```
{% endraw %}
## `branding`
**Optional** You can use a color and [Feather](https://feathericons.com/) icon to create a badge to personalize and distinguish your action. Badges are shown next to your action name in [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace?type=actions).
### Example: Configuring branding for an action
```yaml
branding:
icon: 'award'
color: 'green'
```
### `branding.color`
The background color of the badge. Can be one of: `white`, `yellow`, `blue`, `green`, `orange`, `red`, `purple`, or `gray-dark`.
### `branding.icon`
The name of the v4.28.0 [Feather](https://feathericons.com/) icon to use. Brand icons are omitted as well as the following:
<table>
<tr>
<td>coffee</td>
<td>columns</td>
<td>divide-circle</td>
<td>divide-square</td>
</tr>
<tr>
<td>divide</td>
<td>frown</td>
<td>hexagon</td>
<td>key</td>
</tr>
<tr>
<td>meh</td>
<td>mouse-pointer</td>
<td>smile</td>
<td>tool</td>
</tr>
<tr>
<td>x-octagon</td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
Here is an exhaustive list of all currently supported icons:
<!--
This table should match the icon list in `app/models/repository_actions/icons.rb` in the internal github repo.
To support a new icon, update `app/models/repository_actions/icons.rb` and add the svg to `/static/images/icons/feather` in the internal github repo.
-->
<table>
<tr>
<td>activity</td>
<td>airplay</td>
<td>alert-circle</td>
<td>alert-octagon</td>
</tr>
<tr>
<td>alert-triangle</td>
<td>align-center</td>
<td>align-justify</td>
<td>align-left</td>
</tr>
<tr>
<td>align-right</td>
<td>anchor</td>
<td>aperture</td>
<td>archive</td>
</tr>
<tr>
<td>arrow-down-circle</td>
<td>arrow-down-left</td>
<td>arrow-down-right</td>
<td>arrow-down</td>
</tr>
<tr>
<td>arrow-left-circle</td>
<td>arrow-left</td>
<td>arrow-right-circle</td>
<td>arrow-right</td>
</tr>
<tr>
<td>arrow-up-circle</td>
<td>arrow-up-left</td>
<td>arrow-up-right</td>
<td>arrow-up</td>
</tr>
<tr>
<td>at-sign</td>
<td>award</td>
<td>bar-chart-2</td>
<td>bar-chart</td>
</tr>
<tr>
<td>battery-charging</td>
<td>battery</td>
<td>bell-off</td>
<td>bell</td>
</tr>
<tr>
<td>bluetooth</td>
<td>bold</td>
<td>book-open</td>
<td>book</td>
</tr>
<tr>
<td>bookmark</td>
<td>box</td>
<td>briefcase</td>
<td>calendar</td>
</tr>
<tr>
<td>camera-off</td>
<td>camera</td>
<td>cast</td>
<td>check-circle</td>
</tr>
<tr>
<td>check-square</td>
<td>check</td>
<td>chevron-down</td>
<td>chevron-left</td>
</tr>
<tr>
<td>chevron-right</td>
<td>chevron-up</td>
<td>chevrons-down</td>
<td>chevrons-left</td>
</tr>
<tr>
<td>chevrons-right</td>
<td>chevrons-up</td>
<td>circle</td>
<td>clipboard</td>
</tr>
<tr>
<td>clock</td>
<td>cloud-drizzle</td>
<td>cloud-lightning</td>
<td>cloud-off</td>
</tr>
<tr>
<td>cloud-rain</td>
<td>cloud-snow</td>
<td>cloud</td>
<td>code</td>
</tr>
<tr>
<td>command</td>
<td>compass</td>
<td>copy</td>
<td>corner-down-left</td>
</tr>
<tr>
<td>corner-down-right</td>
<td>corner-left-down</td>
<td>corner-left-up</td>
<td>corner-right-down</td>
</tr>
<tr>
<td>corner-right-up</td>
<td>corner-up-left</td>
<td>corner-up-right</td>
<td>cpu</td>
</tr>
<tr>
<td>credit-card</td>
<td>crop</td>
<td>crosshair</td>
<td>database</td>
</tr>
<tr>
<td>delete</td>
<td>disc</td>
<td>dollar-sign</td>
<td>download-cloud</td>
</tr>
<tr>
<td>download</td>
<td>droplet</td>
<td>edit-2</td>
<td>edit-3</td>
</tr>
<tr>
<td>edit</td>
<td>external-link</td>
<td>eye-off</td>
<td>eye</td>
</tr>
<tr>
<td>fast-forward</td>
<td>feather</td>
<td>file-minus</td>
<td>file-plus</td>
</tr>
<tr>
<td>file-text</td>
<td>file</td>
<td>film</td>
<td>filter</td>
</tr>
<tr>
<td>flag</td>
<td>folder-minus</td>
<td>folder-plus</td>
<td>folder</td>
</tr>
<tr>
<td>gift</td>
<td>git-branch</td>
<td>git-commit</td>
<td>git-merge</td>
</tr>
<tr>
<td>git-pull-request</td>
<td>globe</td>
<td>grid</td>
<td>hard-drive</td>
</tr>
<tr>
<td>hash</td>
<td>headphones</td>
<td>heart</td>
<td>help-circle</td>
</tr>
<tr>
<td>home</td>
<td>image</td>
<td>inbox</td>
<td>info</td>
</tr>
<tr>
<td>italic</td>
<td>layers</td>
<td>layout</td>
<td>life-buoy</td>
</tr>
<tr>
<td>link-2</td>
<td>link</td>
<td>list</td>
<td>loader</td>
</tr>
<tr>
<td>lock</td>
<td>log-in</td>
<td>log-out</td>
<td>mail</td>
</tr>
<tr>
<td>map-pin</td>
<td>map</td>
<td>maximize-2</td>
<td>maximize</td>
</tr>
<tr>
<td>menu</td>
<td>message-circle</td>
<td>message-square</td>
<td>mic-off</td>
</tr>
<tr>
<td>mic</td>
<td>minimize-2</td>
<td>minimize</td>
<td>minus-circle</td>
</tr>
<tr>
<td>minus-square</td>
<td>minus</td>
<td>monitor</td>
<td>moon</td>
</tr>
<tr>
<td>more-horizontal</td>
<td>more-vertical</td>
<td>move</td>
<td>music</td>
</tr>
<tr>
<td>navigation-2</td>
<td>navigation</td>
<td>octagon</td>
<td>package</td>
</tr>
<tr>
<td>paperclip</td>
<td>pause-circle</td>
<td>pause</td>
<td>percent</td>
</tr>
<tr>
<td>phone-call</td>
<td>phone-forwarded</td>
<td>phone-incoming</td>
<td>phone-missed</td>
</tr>
<tr>
<td>phone-off</td>
<td>phone-outgoing</td>
<td>phone</td>
<td>pie-chart</td>
</tr>
<tr>
<td>play-circle</td>
<td>play</td>
<td>plus-circle</td>
<td>plus-square</td>
</tr>
<tr>
<td>plus</td>
<td>pocket</td>
<td>power</td>
<td>printer</td>
</tr>
<tr>
<td>radio</td>
<td>refresh-ccw</td>
<td>refresh-cw</td>
<td>repeat</td>
</tr>
<tr>
<td>rewind</td>
<td>rotate-ccw</td>
<td>rotate-cw</td>
<td>rss</td>
</tr>
<tr>
<td>save</td>
<td>scissors</td>
<td>search</td>
<td>send</td>
</tr>
<tr>
<td>server</td>
<td>settings</td>
<td>share-2</td>
<td>share</td>
</tr>
<tr>
<td>shield-off</td>
<td>shield</td>
<td>shopping-bag</td>
<td>shopping-cart</td>
</tr>
<tr>
<td>shuffle</td>
<td>sidebar</td>
<td>skip-back</td>
<td>skip-forward</td>
</tr>
<tr>
<td>slash</td>
<td>sliders</td>
<td>smartphone</td>
<td>speaker</td>
</tr>
<tr>
<td>square</td>
<td>star</td>
<td>stop-circle</td>
<td>sun</td>
</tr>
<tr>
<td>sunrise</td>
<td>sunset</td>
<td>tablet</td>
<td>tag</td>
</tr>
<tr>
<td>target</td>
<td>terminal</td>
<td>thermometer</td>
<td>thumbs-down</td>
</tr>
<tr>
<td>thumbs-up</td>
<td>toggle-left</td>
<td>toggle-right</td>
<td>trash-2</td>
</tr>
<tr>
<td>trash</td>
<td>trending-down</td>
<td>trending-up</td>
<td>triangle</td>
</tr>
<tr>
<td>truck</td>
<td>tv</td>
<td>type</td>
<td>umbrella</td>
</tr>
<tr>
<td>underline</td>
<td>unlock</td>
<td>upload-cloud</td>
<td>upload</td>
</tr>
<tr>
<td>user-check</td>
<td>user-minus</td>
<td>user-plus</td>
<td>user-x</td>
</tr>
<tr>
<td>user</td>
<td>users</td>
<td>video-off</td>
<td>video</td>
</tr>
<tr>
<td>voicemail</td>
<td>volume-1</td>
<td>volume-2</td>
<td>volume-x</td>
</tr>
<tr>
<td>volume</td>
<td>watch</td>
<td>wifi-off</td>
<td>wifi</td>
</tr>
<tr>
<td>wind</td>
<td>x-circle</td>
<td>x-square</td>
<td>x</td>
</tr>
<tr>
<td>zap-off</td>
<td>zap</td>
<td>zoom-in</td>
<td>zoom-out</td>
</tr>
</table>

View File

@@ -0,0 +1,72 @@
---
title: Публикация действий в GitHub Marketplace
intro: 'Вы можете публиковать действия в {% data variables.product.prodname_marketplace %} и предоставлять общий доступ к созданным действиям в сообществе {% data variables.product.prodname_dotcom %}.'
redirect_from:
- /github/automating-your-workflow-with-github-actions/publishing-actions-in-github-marketplace
- /actions/automating-your-workflow-with-github-actions/publishing-actions-in-github-marketplace
- /actions/building-actions/publishing-actions-in-github-marketplace
versions:
fpt: '*'
ghec: '*'
type: how_to
shortTitle: Publish in GitHub Marketplace
ms.openlocfilehash: e16f65116d7aa7c327e937dc2eba8964195e547d
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
ms.translationtype: HT
ms.contentlocale: ru-RU
ms.lasthandoff: 09/11/2022
ms.locfileid: '147884304'
---
Для публикации действий в {% data variables.product.prodname_marketplace %} необходимо принять условия предоставления услуг.
## Сведения о публикации действий
Перед публикацией действия необходимо создать его в репозитории. Дополнительные сведения см. в статье "[Создание действий](/actions/creating-actions)".
При планировании публикации действия в {% data variables.product.prodname_marketplace %} необходимо убедиться в том, что в репозитории содержатся только файл метаданных, код и файлы, необходимые для действия. Создание отдельного репозитория для действия позволяет пометить, выпустить и упаковать код в одном блоке. На {% data variables.product.prodname_dotcom %} метаданные действия также используются на странице {% data variables.product.prodname_marketplace %}.
Действия публикуются в {% data variables.product.prodname_marketplace %} немедленно и не проверяются {% data variables.product.prodname_dotcom %} при условии соответствия следующим требованиям:
- Действие должно находиться в общедоступном репозитории.
- Каждый репозиторий должен содержать одно действие.
- Файл метаданных действия (`action.yml` или `action.yaml`) должен находиться в корневом каталоге репозитория.
- Атрибут `name` в файле метаданных действия должен быть уникальным.
- Атрибут `name` не может совпадать с именем существующего действия, опубликованного в {% data variables.product.prodname_marketplace %}.
- Атрибут `name` не может совпадать с именем пользователя или организации на {% data variables.product.prodname_dotcom %}, если это действие не публикует пользователь или владелец организации. Например, только организация {% data variables.product.prodname_dotcom %} может опубликовать действие с именем `github`.
- Атрибут `name` не должен совпадать с существующей категорией {% data variables.product.prodname_marketplace %}.
- Имена функций {% data variables.product.prodname_dotcom %} на {% data variables.product.prodname_dotcom %} зарезервированы.
## Публикация действия
Вы можете добавить созданное вами действие в {% data variables.product.prodname_marketplace %}, пометив его как новый выпуск и опубликовав.
Чтобы создать черновик нового выпуска и опубликовать действие в {% data variables.product.prodname_marketplace %}, выполните приведенные ниже инструкции.
{% data reusables.repositories.navigate-to-repo %}
1. Перейдите к файлу метаданных действия в вашем репозитории (`action.yml` или `action.yaml`), и вы увидите баннер для публикации действия в {% data variables.product.prodname_marketplace %}. Нажмите кнопку **Создать черновик выпуска**.
![Кнопка публикации действия в Marketplace](/assets/images/help/repository/publish-github-action-to-marketplace-button.png)
1. В разделе "Действие выпуска" установите флажок для публикации действия в {% data variables.product.prodname_marketplace %}. Если вы не можете установить флажок, сначала перейдите по ссылке, чтобы прочитать и принять {% data variables.product.prodname_marketplace %} Соглашение разработчика.
![Выберите публикацию в Marketplace](/assets/images/help/repository/marketplace_actions_publish.png)
1. Если метки в файле метаданных содержат какие-либо проблемы, появится сообщение об ошибке.
![См. уведомление](/assets/images/help/repository/marketplace_actions_fixerrors.png)
1. Если вы увидите какие-либо предложения на экране, внесите соответствующие изменения в файл метаданных. По завершении вы увидите сообщение "Все в порядке!" .
![Исправление ошибок](/assets/images/help/repository/marketplace_actions_looksgood.png)
1. Выберите основную категорию и при необходимости дополнительную категорию, чтобы пользователям было проще найти ваше действие в {% data variables.product.prodname_marketplace %}.
![Выбор категории](/assets/images/help/repository/marketplace_actions_categories.png)
1. Добавьте к действию тег версии и заголовок выпуска. Это поможет пользователям узнать, какие изменения или функции включены в выпуск. Пользователи будут видеть версию на странице действия в {% data variables.product.prodname_marketplace %}.
![Пометка версии](/assets/images/help/repository/marketplace_actions_version.png)
1. Заполните остальные поля и щелкните **Опубликовать выпуск**. Для публикации необходимо использовать двухфакторную проверку подлинности. Подробнее: [Настройка двухфакторной проверки подлинности](/articles/configuring-two-factor-authentication/).
![Публикация выпуска](/assets/images/help/repository/marketplace_actions_publishrelease.png)
## Удаление действия из {% data variables.product.prodname_marketplace %}
Чтобы удалить опубликованное действие из {% data variables.product.prodname_marketplace %}, необходимо обновить каждый опубликованный выпуск. Выполните указанные ниже действия для каждого выпуска действия, опубликованного в {% data variables.product.prodname_marketplace %}.
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %}
3. На странице "Выпуски" справа от выпуска, который нужно изменить, нажмите кнопку **Изменить**.
![Кнопка изменения выпуска](/assets/images/help/releases/release-edit-btn.png)
4. Выберите **Опубликовать это действие в {% data variables.product.prodname_marketplace %}** , чтобы снять флажок.
![Кнопка "Опубликовать это действие"](/assets/images/help/repository/actions-marketplace-unpublish.png)
5. В нижней части страницы щелкните **Обновить выпуск**.
![Кнопка "Обновить выпуск"](/assets/images/help/repository/actions-marketplace-update-release.png)

View File

@@ -0,0 +1,100 @@
---
title: Выпуск и обслуживание действий
shortTitle: Release and maintain actions
intro: Вы можете использовать автоматизацию и рекомендации с открытым кодом по выпуску и обслуживанию действий.
type: tutorial
topics:
- Action development
- Actions
- Community
versions:
fpt: '*'
ghec: '*'
ghes: '*'
ghae: '*'
ms.openlocfilehash: 49e1da781c5e223e229f097dc04b8bd49bbb64ba
ms.sourcegitcommit: 7b86410fc3bc9fecf0cb71dda4c7d2f0da745b85
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/05/2022
ms.locfileid: '148009983'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Введение
После создания действия вы захотите продолжить выпуск новых функций при работе с вкладами от участников сообщества. В этом учебнике описан пример процесса выпуска и обслуживания действий с открытым кодом. Пример.
* Использует {% data variables.product.prodname_actions %} для непрерывной интеграции, обновлений зависимостей, управления выпусками и автоматизации задач.
* Обеспечивает надежность с помощью автоматических тестов и индикаторов сборки.
* Указывает, как можно использовать действие, желательно в рамках более широкого рабочего процесса.
* Сообщите, какой тип вкладов от участников сообщества вы приветствуете. (Например, проблемы, запросы на вытягивание или отчеты об уязвимостях.)
Пример этого процесса см. здесь: [github-developer/javascript-action](https://github.com/github-developer/javascript-action).
## Разработка и выпуск действий
В этом разделе мы рассмотрим пример процесса разработки и выпуска действий и покажем, как использовать {% data variables.product.prodname_actions %} для его автоматизации.
### Сведения о действиях JavaScript
Действия JavaScript — это репозитории Node.js с метаданными. Однако действия JavaScript имеют дополнительные свойства по сравнению с традиционными проектами Node.js:
* Зависимые пакеты фиксируются вместе с кодом, обычно в скомпилированной и минифицированной форме. Это означает, что автоматизированные сборки и безопасные вклады сообщества важны.
{% ifversion fpt or ghec %}
* Выпуски с тегами можно публиковать непосредственно в {% data variables.product.prodname_marketplace %} и использовать в рабочих процессах в {% data variables.product.prodname_dotcom %}.
{% endif %}
* Многие действия используют программные интерфейсы {% data variables.product.prodname_dotcom %} и сторонние API, поэтому мы рекомендуем комплексное тестирование.
### Настройка рабочих процессов {% data variables.product.prodname_actions %}
Для поддержки процесса разработки, описанного в следующем разделе, добавьте в репозиторий два рабочих процесса с данными {% data variables.product.prodname_actions %}.
1. Добавьте рабочий процесс, который активируется при отправке фиксации в ветвь компонента или в `main`, а также при создании запроса на вытягивание. Настройте рабочий процесс, чтобы он выполнял модульные и интеграционные тесты. В качестве примера ознакомьтесь с [этим рабочим процессом](https://github.com/github-developer/javascript-action/blob/963a3b9a9c662fd499419a240ed8c49411ff5add/.github/workflows/test.yml).
2. Добавьте рабочий процесс, который активируется при публикации или редактировании выпуска. Настройте рабочий процесс, чтобы обеспечить наличие семантических тегов. Вы можете использовать действие, например [JasonEtco/build-and-tag-action](https://github.com/JasonEtco/build-and-tag-action), для компиляции и объединения файла JavaScript и метаданных, а также принудительной отправки семантических тегов основных версий, дополнительных версий и исправлений. В качестве примера ознакомьтесь с [этим рабочим процессом](https://github.com/github-developer/javascript-action/blob/963a3b9a9c662fd499419a240ed8c49411ff5add/.github/workflows/publish.yml). Дополнительные сведения о семантических тегах см. в статье [Сведения о семантическом управлении версиями](https://docs.npmjs.com/about-semantic-versioning).
### Пример процесса разработчика
Ниже приведен пример процесса, который можно выполнить для автоматического выполнения тестов, создания выпуска{% ifversion fpt or ghec%} и публикации в {% data variables.product.prodname_marketplace %}{% endif %}, а также публикации действия.
1. Выполняйте работу над функциями в ветвях согласно стандартному процессу работы с GitHub. Дополнительные сведения см. в разделе [Процесс работы с GitHub](/get-started/quickstart/github-flow).
* При отправке фиксации в ветвь функции рабочий процесс тестирования будет автоматически выполнять тесты.
2. Создавайте запросы на вытягивание из ветви `main`, чтобы инициировать обсуждение и проверку, а по завершении выполните слияние ветви.
* При открытии запроса на вытягивание из ветви или вилки рабочий процесс тестирования снова выполнит тесты, на этот раз с фиксацией слияния.
* **Примечание.** По соображениям безопасности рабочие процессы, активированные `pull_request` из вилок, имеют ограниченные разрешения `GITHUB_TOKEN` и не имеют доступа к секретам. Если тесты или другие рабочие процессы, активированные при запросе на вытягивание, требуют доступа к секретам, рассмотрите возможность использования другого события, например [ручного триггера](/actions/reference/events-that-trigger-workflows#manual-events) или [`pull_request_target`](/actions/reference/events-that-trigger-workflows#pull_request_target). Дополнительные сведения см. [здесь](/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories).
3. Создайте выпуск с семантическими тегами. {% ifversion fpt or ghec %} Вы также можете опубликовать в {% data variables.product.prodname_marketplace %} с помощью простого флажка. {% endif %} Дополнительные сведения приведены в статье [Управление выпусками в репозитории](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release){% ifversion fpt or ghec %} и [Публикация действий в {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}.
* При публикации или изменении выпуска рабочий процесс выпуска будет автоматически выполнять компиляцию и настройку тегов.
* Рекомендуем создавать выпуски с использованием тегов с семантическими версиями, например `v1.1.3`, и сохранять теги основной версии (`v1`) и дополнительной версии (`v1.1`) в соответствии с последней успешной фиксацией. Дополнительные сведения см. в статье [Сведения о настраиваемых действиях](/actions/creating-actions/about-custom-actions#using-release-management-for-actions) и [Сведения о семантическом управлении версиями](https://docs.npmjs.com/about-semantic-versioning).
### Результаты
В отличие от некоторых других стратегий автоматического управления выпусками, этот процесс намеренно не фиксирует зависимости в ветви `main`, а только в фиксации выпусков с тегами. Таким образом, вы призываете пользователей вашего действия ссылаться на именованные теги или `sha`, и помогаете обеспечить безопасность сторонних запросов на вытягивание, выполняя сборку самостоятельно во время выпуска.
Использование семантических выпусков означает, что пользователи ваших действий могут закреплять рабочие процессы в версии и быть уверенными, что они будут и дальше получать последние стабильные функции без критических изменений в зависимости от того, что им подходит:
## Работа с сообществом
{% data variables.product.product_name %} предоставляет инструменты и руководства для работы с сообществом открытого кода. Ниже приведено несколько средств, которые рекомендуется настроить для эффективной двухсторонней связи. Предоставляя следующие сигналы сообществу, вы побуждаете других пользователей использовать и изменять ваше действие и вносить свой вклад в его разработку:
* Приводите в `README` большое количество примеров использования и рекомендаций. Дополнительные сведения см. в статье [О файлах README](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes).
* Включите значок состояния рабочего процесса в файл `README`. Дополнительные сведения см. в статье [Добавление индикатора состояния рабочего процесса](/actions/managing-workflow-runs/adding-a-workflow-status-badge). Кроме того, посетите [shields.io](https://shields.io/), чтобы узнать о других значках, которые можно добавить.{% ifversion fpt or ghec %}
* Добавьте файлы с правилами взаимодействия и работы членов сообщества, такие как `CODE_OF_CONDUCT`, `CONTRIBUTING` и `SECURITY`. Дополнительные сведения см. в статье [Создание файла по умолчанию с правилами взаимодействия и работы членов сообщества](/github/building-a-strong-community/creating-a-default-community-health-file#supported-file-types).{% endif %}
* Поддерживайте проблемы в актуальном состоянии, используя такие действия, как [actions/stale](https://github.com/actions/stale).
## Дополнительные материалы
Примеры, в которых используются аналогичные шаблоны:
* [github/super-linter](https://github.com/github/super-linter)
* [octokit/request-action](https://github.com/octokit/request-action)
* [github-developer/javascript-action](https://github.com/github-developer/javascript-action)

View File

@@ -0,0 +1,56 @@
---
title: Настройка кодов выхода для действий
shortTitle: Set exit codes
intro: 'Можно использовать коды выхода для настройки состояния действия. {% data variables.product.prodname_dotcom %} отображает состояния, указывающие на действия, которые прошли и не прошли проверку.'
redirect_from:
- /actions/building-actions/setting-exit-codes-for-actions
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
type: how_to
ms.openlocfilehash: 394b17dc03c4998797df222fe7c81c3269003ec9
ms.sourcegitcommit: d3929a033c42c99b153910685256d079d7d87467
ms.translationtype: MT
ms.contentlocale: ru-RU
ms.lasthandoff: 10/27/2022
ms.locfileid: '148114280'
---
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
## Сведения о кодах выхода
{% data variables.product.prodname_dotcom %} использует код выхода, чтобы задать состояние выполнения проверки для действия, которое может иметь значение `success` или `failure`.
Состояние выхода | Состояние проверки выполнения | Описание
------------|------------------|------------
`0` | `success` | Действие успешно завершено, и могут начаться другие задачи, которые от него зависят.
Ненулевое значение (любое целое число, кроме 0)| `failure` | Любой другой код выхода указывает на сбой действия. При сбое действия все параллельные действия отменяются, а будущие действия пропускаются. Выполнение проверки и набор проверки получают состояние `failure`.
## Задание кода выхода при сбое в действии JavaScript
При создании действия JavaScript можно использовать пакет [`@actions/core`](https://github.com/actions/toolkit/tree/main/packages/core) набора средств действий для записи сообщения в журнал и задания кода выхода при сбое (failure). Пример:
```javascript
try {
// something
} catch (error) {
core.setFailed(error.message);
}
```
Дополнительные сведения см. в разделе [Создание действия JavaScript](/articles/creating-a-javascript-action).
## Задание кода выхода при сбое в действии контейнера Docker
Если вы создаете действие контейнера Docker, в скрипте `entrypoint.sh` можно задать код выхода при сбое. Пример:
```
if <condition> ; then
echo "Game over!"
exit 1
fi
```
Дополнительные сведения см. в разделе [Создание действия контейнера Docker](/articles/creating-a-docker-container-action).

Some files were not shown because too many files have changed in this diff Show More