Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples 1-6 description is added to the README.md file #5

Merged
merged 8 commits into from
Aug 2, 2023

Conversation

KaIsa9
Copy link
Collaborator

@KaIsa9 KaIsa9 commented Jun 28, 2023

No description provided.

@KaIsa9 KaIsa9 force-pushed the Readme_updates branch 2 times, most recently from 9e651e5 to 1a8a34f Compare July 4, 2023 12:44
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use, please the ${{ secrets.postgres_password }}


steps:
- uses: actions/checkout@v3
- run: pg_isready -h localhost -p ${{ job.services.postgres.ports[5432] }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove -p ${{ job.services.postgres.ports[5432] }}

- name: Echo secret's value
run: |
echo "Masked: "
echo ${{ secrets.NEW_SECRET }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check secret value if [[ ${{ secrets.NEW_SECRET }} == 'secret_value' ]]

env:
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create env.POSTGRES_PORT at the workflow level and use here and below


- name: Echo unmasked secret's value
run: |
echo ${{ secrets.NEW_SECRET }} | sed 's/./& /g'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sed 's/./& /g' -> sed 's/^\s//g'

```

- Download the latest runner package

Copy link
Collaborator

@bbs-md bbs-md Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To find the latest version of packages, use lastversion tool.
https://github.com/dvershinin/lastversion

Run command
lastversion --assets https://github.com/actions/runner/releases/download --filter "actions-runner-linux-x64-(\d{0,3}\.\d{0,3}\.\d{0,3}).tar.gz"

You get the URL of the actions-runner-linux-x64 resource of the latest version for downloading the file.
In our case 2.305.0 the latest vesion.

Copy `$HOME/awesome-github-actions/07-job-matrix/workflows/self-hosted-wf.yml` file content to `$HOME/awesome-github-actions/.github/workflows/07-job-matrix.yml` file.

Workflow will execute on any runner that matches all the specified runs-on values
This `runs-on: [ self-hosted, Linux ]` matches all Linux runners.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux runners -> self-hosted Linux runners

Workflow will execute on any runner that matches all the specified runs-on values
This `runs-on: [ self-hosted, Linux ]` matches all Linux runners.

As you can see, the job runs on any Linux runner, regardless of the version of the Linux distribution specified in the job
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux runner -> self-hosted Linux runner


As you can see, the job runs on any Linux runner, regardless of the version of the Linux distribution specified in the job

### 5. Run workflow jobs on Linux runners that match the distribution version, specified in the job.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux runner -> self-hosted Linux runner


The job runs on a runner that matches the version of the Linux distribution specified in the job

### 6. Run workflow jobs in containers on Linux runners on which the docker is installed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux runner -> self-hosted Linux runner

@bbs-md bbs-md merged commit a9f197f into main Aug 2, 2023
@bbs-md bbs-md deleted the Readme_updates branch August 2, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants