Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f38810a
dockerfile, makefile and edits to workflow yml
chisholm-ray Feb 15, 2022
74a3edd
edit workflow yml
chisholm-ray Feb 15, 2022
ba121b2
edit workflow yml
chisholm-ray Feb 15, 2022
4c32f5a
edits
chisholm-ray Feb 15, 2022
3d4aac6
edits
chisholm-ray Feb 15, 2022
c199b0b
edits
chisholm-ray Feb 15, 2022
2cad789
edits
chisholm-ray Feb 15, 2022
9190d1a
edits
chisholm-ray Feb 15, 2022
dde353a
edits
chisholm-ray Feb 15, 2022
75e5a66
edits
chisholm-ray Feb 15, 2022
7633941
wdits
chisholm-ray Feb 15, 2022
523d4b1
edits
chisholm-ray Feb 15, 2022
05af44a
edits
chisholm-ray Feb 15, 2022
5bda06e
edits
chisholm-ray Feb 15, 2022
5ca86ef
edits
chisholm-ray Feb 15, 2022
816ec72
edits
chisholm-ray Feb 15, 2022
deb63a7
edits
chisholm-ray Feb 15, 2022
8991824
edits
chisholm-ray Feb 15, 2022
b40fb69
edits
chisholm-ray Feb 15, 2022
1871815
edits
chisholm-ray Feb 15, 2022
57cc896
edits
chisholm-ray Feb 15, 2022
f7839ce
edits
chisholm-ray Feb 15, 2022
6efc8b7
edits
chisholm-ray Feb 15, 2022
7742af3
editds
chisholm-ray Feb 16, 2022
bc05274
edit
chisholm-ray Feb 16, 2022
a17d89a
edits
chisholm-ray Feb 16, 2022
89f7e58
edits
chisholm-ray Feb 16, 2022
7b0b44f
edits
chisholm-ray Feb 16, 2022
760e09e
edits
chisholm-ray Feb 16, 2022
c8d7466
edits
chisholm-ray Feb 16, 2022
d1296b3
edits
chisholm-ray Feb 16, 2022
8b4c823
edits
chisholm-ray Feb 16, 2022
05db86a
edits
chisholm-ray Feb 16, 2022
2b07e48
edits
chisholm-ray Feb 16, 2022
fe9f78d
edits
chisholm-ray Feb 16, 2022
0f25a4f
edits
chisholm-ray Feb 16, 2022
e160a10
edits
chisholm-ray Feb 16, 2022
a40742e
edits
chisholm-ray Feb 16, 2022
e7261ef
edits
chisholm-ray Feb 16, 2022
1465a75
edit dockerfile
chisholm-ray Feb 16, 2022
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
43 changes: 43 additions & 0 deletions .github/workflows/chisholm-ray_c05-actions02.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 3M workflow with comment on PR

on:
pull_request:
paths:
- 'chisholm-ray/actions02/**'

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: chisholm-ray/actions02/

steps:
- uses: actions/checkout@v2

- name: set variables
run: |
echo ${{ github.sha }} | head -c 7 > TAG_SHA
echo "IMAGEFULLNAME=${{ secrets.CCR_DOCKERU }}/actions02:$(cat TAG_SHA)" >> $GITHUB_ENV

- name: docker login
env:
CCR_DOCKERU: ${{ secrets.CCR_DOCKERU }}
CCR_DOCKERP: ${{ secrets.CCR_DOCKERP }}
run: |
make login

- name: build image
run: make build

- name: push image
run: make push

- name: Comment PR
uses: thollander/actions-comment-pull-request@v1

with:
message: 'Image name ${{ env.IMAGEFULLNAME}} has been pushed to dockerhub'
GITHUB_TOKEN: ${{ secrets.CCR_GITHUB_TOKEN}}

2 changes: 2 additions & 0 deletions chisholm-ray/actions02/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM httpd:2.4.51
RUN echo "This is my GH actions exercise v2" > /usr/local/apache2/htdocs/index.html
16 changes: 16 additions & 0 deletions chisholm-ray/actions02/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#vars


.PHONY: build push login

build:
@echo "Building image with tag ${IMAGEFULLNAME}"
@docker build -t ${IMAGEFULLNAME} -f ./Dockerfile .

push:
@echo "Pushing image with tag ${IMAGEFULLNAME} to DockerHub"
@docker image push ${IMAGEFULLNAME}

login:
@echo "Logging into DockerHub with provided credentials"
@printf ${CCR_DOCKERP} | docker login -u ${CCR_DOCKERU} --password-stdin