From 0eef5f757e7f56d7b1fe9be9cbc8143540f7beb7 Mon Sep 17 00:00:00 2001 From: Sofus Albertsen Date: Wed, 31 Jan 2024 09:42:12 +0100 Subject: [PATCH] Update workflows and documentation --- .github/workflows/main.yaml | 4 +++- labs/extend-pipeline.md | 25 ++++++++++++----------- labs/storing-artifacts.md | 22 ++++++++++---------- trainer/.github/workflows/extend-app.yaml | 13 ++++++++++++ 4 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 trainer/.github/workflows/extend-app.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 652d03cf..3cce0c1d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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 \ No newline at end of file diff --git a/labs/extend-pipeline.md b/labs/extend-pipeline.md index e9ee7656..60c46df7 100644 --- a/labs/extend-pipeline.md +++ b/labs/extend-pipeline.md @@ -22,18 +22,19 @@ If you strugle and need to see the whole ***Solution*** you can extend the secti Solution ```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 ``` diff --git a/labs/storing-artifacts.md b/labs/storing-artifacts.md index 322b0ab2..fe8ab092 100644 --- a/labs/storing-artifacts.md +++ b/labs/storing-artifacts.md @@ -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:
diff --git a/trainer/.github/workflows/extend-app.yaml b/trainer/.github/workflows/extend-app.yaml new file mode 100644 index 00000000..0b100d1d --- /dev/null +++ b/trainer/.github/workflows/extend-app.yaml @@ -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 \ No newline at end of file