From 1ac74ff20b9fafe31259ca79c17358c7d1577776 Mon Sep 17 00:00:00 2001 From: Anuj Kumar Singh Date: Fri, 28 Feb 2025 15:30:35 +0530 Subject: [PATCH 1/4] simple workflow --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f3715fc --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: 010-blank-workflow + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From 9a6c16c52335e26d458f8f0d4a6628624b169383 Mon Sep 17 00:00:00 2001 From: Anuj Kumar Singh Date: Fri, 28 Feb 2025 16:13:15 +0530 Subject: [PATCH 2/4] Update 010-blank-workflow.yml --- .github/workflows/010-blank-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/010-blank-workflow.yml b/.github/workflows/010-blank-workflow.yml index a466083..9e8fcee 100644 --- a/.github/workflows/010-blank-workflow.yml +++ b/.github/workflows/010-blank-workflow.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: 010-blank-workflow +name: CI # Controls when the workflow will run on: From f29db9529c2ab35d94a649b06c0bfd55188f6b40 Mon Sep 17 00:00:00 2001 From: Anuj Kumar Singh Date: Fri, 28 Feb 2025 16:14:27 +0530 Subject: [PATCH 3/4] Update 010-blank-workflow.yml --- .github/workflows/010-blank-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/010-blank-workflow.yml b/.github/workflows/010-blank-workflow.yml index 9e8fcee..6e73746 100644 --- a/.github/workflows/010-blank-workflow.yml +++ b/.github/workflows/010-blank-workflow.yml @@ -6,9 +6,9 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the main branch push: - branches: none # [ main ] + branches: [ main ] pull_request: - branches: none # [ main ] + branches: [ main ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 7b13a5865a0247726ae8a8ecad776727acbf5f51 Mon Sep 17 00:00:00 2001 From: Anuj Kumar Singh Date: Fri, 28 Feb 2025 18:10:01 +0530 Subject: [PATCH 4/4] Create docker-image.yml --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..3f53646 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)