Skip to content

Commit

Permalink
Merge pull request #24 from Z-byte-prog/snyk-fix-87c01b387eb76fb2963b…
Browse files Browse the repository at this point in the history
…d47ebe34bfc0

[Snyk] Security upgrade debian from stretch-20210816-slim to 11-slim
  • Loading branch information
Z-byte-prog authored Sep 29, 2021
2 parents 51095d4 + 8771a51 commit f65d740
Show file tree
Hide file tree
Showing 150 changed files with 783 additions and 310 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/content-changes-table-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
filters: |
filterContentDir:
- 'content/**/*'
filterContentDir:
needs: PR-Preview-Links
if: ${{ needs.PR-Preview-Links.outputs.filterContentDir == 'true' }}
Expand All @@ -45,8 +46,10 @@ jobs:
node-version: 16.8.x
cache: npm

- name: Install dependencies
run: npm ci
- name: Install temporary dependencies
run: |
npm install --no-save github-slugger
npm install --no-save --include=optional esm
- name: Get changes table
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
Expand All @@ -55,14 +58,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
const slugify = require('github-slugger').slug
// Workaround to allow us to load ESM files with `require(...)`
const esm = require('esm')
require = esm({})
const HEROKU_APPNAME_MAX_LENGTH = 30
const { default: createStagingAppName } = require('./script/deployment/create-staging-app-name')
const repoName = context.payload.repository.name
const branchName = context.payload.pull_request.head.ref
const prNumber = context.payload.number
const stagingPrefix = getStagingPrefix(repoName, prNumber, branchName)
const stagingPrefix = createStagingAppName({
repo: context.payload.repository.name,
pullNumber: context.payload.number,
branch: context.payload.pull_request.head.ref,
})
const response = await github.repos.compareCommits({
owner: context.repo.owner,
Expand Down Expand Up @@ -93,14 +99,6 @@ jobs:
markdownTable += markdownLine
}
function getStagingPrefix (prefix, prNumber, branch) {
// Added a - in front of prNumber
return `${prefix}-${prNumber}--${slugify(branch)}`
.toLowerCase()
.slice(0, HEROKU_APPNAME_MAX_LENGTH)
.replace(/_/g, '-')
.replace(/-+$/, '')
}
core.setOutput('changesTable', markdownTable)
- name: Find content directory changes comment
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ topics:
children:
- /about-your-personal-dashboard
- /managing-your-theme-settings
- /managing-your-tab-size-rendering-preference
- /changing-your-github-username
- /merging-multiple-user-accounts
- /converting-a-user-into-an-organization
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Managing your tab size rendering preference
intro: 'You can manage the number of spaces a tab is equal to for your user account.'
versions:
fpt: '*'
topics:
- Accounts
shortTitle: Managing your tab size
---

If you feel that tabbed indentation in code rendered on {% data variables.product.product_name %} takes up too much, or too little space, you can change this in your settings.

{% data reusables.user_settings.access_settings %}
1. In the user settings sidebar, click **Appearance**.
!["Appearance" tab in user settings sidebar](/assets/images/help/settings/appearance-tab.png)
2. Under "Tab size preference", select the drop-down menu and choose your preference.
![Tab size preference button](/assets/images/help/settings/tab-size-preference.png )
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ topics:

## About workflow artifacts

Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended.
Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run. For example, you can use artifacts to save your build and test output after a workflow run has ended. {% data reusables.actions.reusable-workflow-artifacts %}

{% data reusables.github-actions.artifact-log-retention-statement %} The retention period for a pull request restarts each time someone pushes a new commit to the pull request.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
---
title: Sharing workflows with your organization
shortTitle: Sharing workflows with your organization
intro: 'Learn how you can use organization features to collaborate with your team, by sharing workflow templates, secrets, and self-hosted runners.'
title: Creating workflow templates
shortTitle: Creating templates
intro: 'Learn how you can create workflow templates to help people in your team add new workflows more easily.'
redirect_from:
- /actions/configuring-and-managing-workflows/sharing-workflow-templates-within-your-organization
versions:
fpt: '*'
ghes: '*'
ghae: '*'
type: how_to
type: tutorial
topics:
- Workflows
- CI
---

{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
{% data reusables.actions.ae-beta %}

## Overview

If you need to share workflows and other {% data variables.product.prodname_actions %} features with your team, then consider collaborating within a {% data variables.product.prodname_dotcom %} organization. An organization allows you to centrally store and manage secrets, artifacts, and self-hosted runners. You can also create workflow templates in the `.github` repository and share them with other users in your organization.
{% data reusables.actions.workflow-organization-templates %}

## Creating a workflow template

Workflow templates can be created by users with write access to the organization's `.github` repository. The templates can then be used by organization members who have permission to create workflows.

{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 %}
{% note %}

**Note:** Workflow templates can be used to create new workflows in an organization' s public repository; to use templates to create workflows in private repositories, the organization must be part of an enterprise plan.
**Note:** To avoid duplication in workflows created from a template you can call reusable workflows from within a workflow template. This can help make your workflows easier to maintain. For more information, see "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)."

{% endnote %}
{% endif %}

This procedure demonstrates how to create a workflow template and metadata file. The metadata file describes how the template is presented to users when they are creating a new workflow.

Expand Down Expand Up @@ -84,42 +88,6 @@ To add another workflow template, add your files to the same `workflow-templates

![Workflow template files](/assets/images/help/images/workflow-template-files.png)

## Using a workflow template from your organization

This procedure demonstrates how a member of your organization can find and use a workflow template to create a new workflow. An organization's workflow templates can be used by anyone who is a member of the organization.

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
1. If your repository already has existing workflows: In the upper-left corner, click **New workflow**.
![Create a new workflow](/assets/images/help/repository/actions-new-workflow.png)
1. Your organization's workflow templates are located in their own section titled "Workflows created by _organization name_". Under the name of the template you'd like to use, click **Set up this workflow**.
![Set up this workflow](/assets/images/help/settings/actions-create-starter-workflow.png)


## Sharing secrets within an organization

You can centrally manage your secrets within an organization, and then make them available to selected repositories. This also means that you can update a secret in one location, and have the change apply to all repository workflows that use the secret.

When creating a secret in an organization, you can use a policy to limit which repositories can access that secret. For example, you can grant access to all repositories, or limit access to only private repositories or a specified list of repositories.

{% data reusables.github-actions.permissions-statement-secrets-organization %}

{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.github-actions.sidebar-secret %}
1. Click **New secret**.
1. Type a name for your secret in the **Name** input box.
1. Enter the **Value** for your secret.
1. From the **Repository access** dropdown list, choose an access policy.
1. Click **Add secret**.

## Share self-hosted runners within an organization

Organization admins can add their self-hosted runners to groups, and then create policies that control which repositories can access the group.

For more information, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups)."


## Next steps

To continue learning about {% data variables.product.prodname_actions %}, see "[Security hardening for {% data variables.product.prodname_actions %}](/actions/learn-github-actions/security-hardening-for-github-actions)."
To continue learning about {% data variables.product.prodname_actions %}, see "[Using workflow templates](/actions/learn-github-actions/using-workflow-templates)."
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For more information, see "[Workflow syntax for {% data variables.product.prodna

## Sharing data between jobs

If your job generates files that you want to share with another job in the same workflow, or if you want to save the files for later reference, you can store them in {% data variables.product.prodname_dotcom %} as _artifacts_. Artifacts are the files created when you build and test your code. For example, artifacts might include binary or package files, test results, screenshots, or log files. Artifacts are associated with the workflow run where they were created and can be used by another job.
If your job generates files that you want to share with another job in the same workflow, or if you want to save the files for later reference, you can store them in {% data variables.product.prodname_dotcom %} as _artifacts_. Artifacts are the files created when you build and test your code. For example, artifacts might include binary or package files, test results, screenshots, or log files. Artifacts are associated with the workflow run where they were created and can be used by another job. {% data reusables.actions.reusable-workflow-artifacts %}

For example, you can create a file and then upload it as an artifact.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,26 @@ on:
types: [opened, deleted]
```

{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 %}
## Workflow reuse events

`workflow_call` is a keyword used as the value of `on` in a workflow, in the same way as an event. It indicates that a workflow can be called from another workflow. For more information see, "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)."

### `workflow_call`

| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
| ------------------ | ------------ | ------------ | ------------------|
| Same as the caller workflow | n/a | Same as the caller workflow | Same as the caller workflow |

#### Example

To make a workflow reusable it must include `workflow_call` as one of the values of `on`. The example below only runs the workflow when it's called from another workflow:

```yaml
on: workflow_call
```
{% endif %}

## Webhook events

You can configure your workflow to run when webhook events are generated on {% data variables.product.product_name %}. Some events have more than one activity type that triggers the event. If more than one activity type triggers the event, you can specify which activity types will trigger the workflow to run. For more information, see "[Webhooks](/webhooks)."
Expand Down
4 changes: 3 additions & 1 deletion content/actions/learn-github-actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ children:
- /finding-and-customizing-actions
- /essential-features-of-github-actions
- /managing-complex-workflows
- /sharing-workflows-with-your-organization
- /sharing-workflows-secrets-and-runners-with-your-organization
- /creating-workflow-templates
- /using-workflow-templates
- /reusing-workflows
- /events-that-trigger-workflows
- /expressions
- /contexts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ To learn more about self-hosted runner labels, see ["Using labels with self-host
To learn more about {% data variables.product.prodname_dotcom %}-hosted runner labels, see ["Supported runners and hardware resources"](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources).
{% endif %}

{% data reusables.actions.reusable-workflows %}

{% ifversion fpt or ghes > 3.0 %}
## Using environments

Expand All @@ -189,4 +191,4 @@ You can configure environments with protection rules and secrets. Each job in a

## Next steps

To continue learning about {% data variables.product.prodname_actions %}, see "[Sharing workflows with your organization](/actions/learn-github-actions/sharing-workflows-with-your-organization)."
To continue learning about {% data variables.product.prodname_actions %}, see "[Sharing workflows, secrets, and runners with your organization](/actions/learn-github-actions/sharing-workflows-secrets-and-runners-with-your-organization)."
Loading

0 comments on commit f65d740

Please sign in to comment.