Skip to content

Commit

Permalink
Update workflows and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sofusalbertsen committed Jan 31, 2024
1 parent bd8647c commit 0eef5f7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 24 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
with:
name: code
path: .
- name: ls
run: ls -la ci
- name: build docker
run: ci/build-docker.sh
run: bash ci/build-docker.sh
- name: push docker
run: ci/push-docker.sh
25 changes: 13 additions & 12 deletions labs/extend-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ If you strugle and need to see the whole ***Solution*** you can extend the secti
<summary> Solution </summary>

```YAML
on: push
jobs:
Build:
runs-on: ubuntu-latest
container: gradle:6-jdk11
steps:
- name: Clone down repository
uses: actions/checkout@v4
- name: Build application
run: ci/build-app.sh
- name: Test
run: ci/unit-test-app.sh
name: Main workflow
on: push
jobs:
Build:
runs-on: ubuntu-latest
container: gradle:6-jdk11
steps:
- name: Clone down repository
uses: actions/checkout@v4
- name: Build application
run: ci/build-app.sh
- name: Test
run: ci/unit-test-app.sh

```

Expand Down
22 changes: 11 additions & 11 deletions labs/storing-artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ To deal with artifacts, a `Github Actions Action` can be used, which can be foun
To upload artifacts use the following syntax with `actions/upload-artifact@v4` [Link to documentation](https://github.com/marketplace/actions/upload-a-build-artifact):

```YAML
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: path/to/artifact/
- name: Upload a Build Artifact # Name of the step
uses: actions/upload-artifact@v4 # Action to use
with: # Parameters for the action
name: my-artifact # Name of the artifact to upload. Optional. Default is 'artifact
path: path/to/artifact/ # A file, directory or wildcard pattern that describes what to upload. Required.
```
As artifacts can be uploaded it can also be downloaded from Github Actions with help of `actions/download-artifact@v4` as:

```YAML
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: my-artifact
path: path/to/download/artifact/
- name: Download a single artifact # Name of the step
uses: actions/download-artifact@v4 # Action to use
with: # Parameters for the action
name: my-artifact # Name of the artifact to download. Optional. If unspecified, all artifacts for the run are downloaded.
path: path/to/download/artifact/ # Destination path. Supports basic tilde expansion. # Optional. Default is $GITHUB_WORKSPACE
```

[Link to documentation](https://github.com/actions/download-artifact)
You can find more information around the different parameters via the [link to documentation for download action](https://github.com/actions/download-artifact).

:bulb:
<details>
Expand Down
13 changes: 13 additions & 0 deletions trainer/.github/workflows/extend-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Main workflow
on: push
jobs:
Build:
runs-on: ubuntu-latest
container: gradle:6-jdk11
steps:
- name: Clone down repository
uses: actions/checkout@v4
- name: Build application
run: ci/build-app.sh
- name: Test
run: ci/unit-test-app.sh

0 comments on commit 0eef5f7

Please sign in to comment.