Publishing test results using core actions
- Refer Here for core actions
- caching could save build times Refer Here. Some of the implementation examples
Contexts
- Github actions contexts are special variables that provide information about the workflow, the job and the environment Refer Here for official docs
- To use the context variable the syntax is
${{ context.property }}
ENVIRONMENTAL Variables
- Refer Here for official docs
- Defining Envrionmental variables
- at a workflow level
- at a job level
- at a step level
---
name: ci-worflow
on:
push:
branches:
- main
env:
MY_WORKFLOW_VAR: "hello"
jobs:
build:
name: build java code using maven
env:
MY_JOB_VAR: "job-hello"
runs-on: ubuntu-24.04
steps:
- name: get the code
uses: actions/checkout@v4
- run: printenv
env:
MY_STEP_VAR: "step-hello"
- run: "echo $MY_WORKFLOW_VAR, $MY_JOB_VAR, $MY_STEP_VAR"
env:
MY_STEP_VAR: "step-hello"
- run: Set environmental variable
run: "MY_DYNAMIC_VAR=Hello"
- name: setup java 17
uses: actions/setup-java@v4.5.0
with:
java-version: 17
distribution: temurin
- To use environmental variable use
$VAR_NAMESYNTAX
Secrets and Configuration values
- Refer Here for official docs


VSCODE Extension and other areas
- Settings

- Refer Here for debug logs
- Running your workflows locally Refer Here
Building Github actions
Creating a Docker image action
- Refer Here for the repository
- Create credentials and store them as secrets
- Refer Here for the workflow with secret scanning
- Exercise:
- Show failure for any critical issues
- Push the image to acr/ecr/gcr
