Skip to content

Commit

Permalink
Add Kubernetes resources for deployment, pod, job, replicaset, servic…
Browse files Browse the repository at this point in the history
…e, and namespace
  • Loading branch information
Pradumnasaraf committed Aug 28, 2024
1 parent c6ea19b commit 43c23b0
Show file tree
Hide file tree
Showing 17 changed files with 643 additions and 83 deletions.
2 changes: 2 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: '3.7'

services:
server:
build:
Expand Down
39 changes: 39 additions & 0 deletions docs/github-actions/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,45 @@ jobs:
run: echo ${{ needs.deploy.outputs.url }}
```

## Artifacts

It allows you to share data between jobs in a workflow and store data once the workflow has been completed. We can use the `upload-artifact` and `download-artifact` actions to upload and download artifacts.

```yaml
name: Share data between jobs
on: [push]
jobs:
job_1:
name: Generate Random Number
runs-on: ubuntu-latest
steps:
- shell: bash
run: |
echo $((RANDOM % 100)) > random-number.txt
- name: Upload random number for job 1
uses: actions/upload-artifact@v4
with:
name: random_number
path: random-number.txt
job_2:
name: Echo Random Number
needs: job_1
runs-on: ubuntu-latest
steps:
- name: Download random number from job 1
uses: actions/download-artifact@v4
with:
name: random_number
- shell: bash
run: |
number=$(cat random-number.txt)
echo The random number is $number
```


### What's next?

- [Scenarios](./scenarios.md) - A collection of GitHub Actions workflow files I use and created to help you understand the concepts better.
Expand Down
Loading

0 comments on commit 43c23b0

Please sign in to comment.