Skip to content

Commit

Permalink
added github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
raghunadhpokkalath committed Aug 23, 2020
1 parent 0f032ad commit 5250d51
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/raghunadh-c05actions-02.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Raghu Github Actions C05-02
on:
pull_request:
paths:
- "raghunadhpokkalath/c05-actions02/**"
jobs:
dockerbuildandpush:
runs-on: ubuntu-latest
steps:
- name: "Setup - Checkout"
uses: actions/[email protected]
- name: "Docker Build and Push"
run: |
echo "list folder"
ls
cd raghunadhpokkkalath
make build
DOCKER_PAT=${{ secrets.RAGHU_DOCKER_PAT }} make push
uses: mshick/add-pr-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.RAGHU_PAT }}
with:
message: |
Well done ${{ secrets.RAGHU_NAME }}! This is a nice PRN
allow-repeats: false
2 changes: 2 additions & 0 deletions raghunadhpokkalath/c05-actions02/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM httpd:2.4.41
RUN echo "This is my GH actions exercise" > /usr/local/apache2/htdocs/index.html
10 changes: 10 additions & 0 deletions raghunadhpokkalath/c05-actions02/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SHA=$(shell git rev-parse --short HEAD)
DOCKER_USER=raghunadhp
.PHONY: build
build:
docker build -t ${DOCKER_USER}/my-image:${SHA} .
.PHONY: push
push:
docker login --username ${DOCKER_USER} -p ${DOCKER_PAT}
#0194da5c-e466-4e7f-970f-bed28f7fa39a
docker push raghunadhp/my-image:${SHA}

0 comments on commit 5250d51

Please sign in to comment.