Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/cd-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: 07-2. CD Workflow

on:
# push:
# branches: [main]
workflow_dispatch:
push:
branches: [main]

env:
AZURE_WEBAPP_NAME: your-app-name # set this to your application's name
Expand Down Expand Up @@ -51,7 +50,10 @@ jobs:
steps:

# Add here the download-artifact step

- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app

- name: Deploy to Prod
if: ${{ success() }}
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
# CI job to run a test suite on the code base
ci:
name: CI
if: ${{ always() }}
# We want to test across mutiple OSs, defined by our matrix
runs-on: ${{ matrix.os }}
needs: lint
Expand All @@ -23,8 +24,8 @@ jobs:
fail-fast: true
matrix:
# our matrix for testing across node versions and OSs
node-version: [12, 14]
os: [windows-2019, ubuntu-20.04, ubuntu-22.04]
node-version: [20, 22]
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
- name: Checkout
Expand All @@ -43,7 +44,14 @@ jobs:
echo npm test

# Add here the upload-artifact action

- shell: bash
run: |
echo 'Test upload artifact' > output.log
- name: Upload output file
uses: actions/upload-artifact@v4
with:
name: output-log-file-${{ matrix.node-version }}-${{ matrix.os }}
path: output.log

# If both linting and CI succeeds we want to deploy the code to a test environment
deploy-test:
Expand All @@ -58,7 +66,10 @@ jobs:
uses: actions/checkout@v4

# Add here the download-artifact step

- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: output-log-file-22-ubuntu-latest # default artifact

# Placeholder - this step would be some action or run commands that deploys the code
- name: Deploy to test env
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: 01-1. GitHub Actions Demo
on:
workflow_dispatch:
workflow_call:
push:
branches:
- main
paths:
- 'labs/**'

jobs:
Explore-GitHub-Actions:
Expand All @@ -20,3 +25,12 @@ jobs:
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Adding markdown
run: echo "### Hello world! :rocket:" >> "$GITHUB_STEP_SUMMARY"
# This step uses GitHub's hello-world-javascript-action: https://github.com/actions/hello-world-javascript-action
- name: Hello world
uses: actions/hello-world-javascript-action@main
with:
who-to-greet: "Mona the Octocat"
id: hello
# This step prints an output (time) from the previous step's action.
- name: Echo the greeting's time
run: echo 'The time was ${{ steps.hello.outputs.time }}.'
34 changes: 34 additions & 0 deletions .github/workflows/job-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,37 @@ jobs:
needs: [fanout1, fanout2]
steps:
- run: echo "This job will run after fanout1 and fanout2 have finished."
build:
runs-on: windows-latest
steps:
- run: echo "This job will be run in parallel with the initial job."
test:
runs-on: ubuntu-latest
needs: build
steps:
- run: echo "This job will be run after the build job."
ring01:
runs-on: ubuntu-latest
needs: test
steps:
- run: echo "This job will be run after the test job."
ring02:
runs-on: macos-latest
needs: test
steps:
- run: echo "This job will be run after the test job."
ring03:
runs-on: ubuntu-latest
needs: test
steps:
- run: echo "This job will be run after the test job."
ring04:
runs-on: ubuntu-latest
needs: [ring01,ring02,ring03]
steps:
- run: echo "This job will be run after the ring01,ring02,ring03 jobs."
prod:
runs-on: ubuntu-latest
needs: [ring04]
steps:
- run: echo "This job will be run after the ring04 job."
3 changes: 3 additions & 0 deletions labs/dummyFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
to trigger workflow

triggered again