Skip to content

Commit 884dd8d

Browse files
Work on using a docker hub hosted image
1 parent 067f491 commit 884dd8d

3 files changed

Lines changed: 48 additions & 2 deletions

File tree

.github/workflows/docker.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Docker Build
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: "Build and deploy"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
strategy:
14+
matrix:
15+
actions-with-docker-image:
16+
- "magento-coding-standard"
17+
- "magento-mess-detector"
18+
19+
env:
20+
DOCKER_USERNAME: "extdn"
21+
22+
steps:
23+
- name: "Checkout"
24+
uses: "actions/checkout@v2.0.0"
25+
26+
- name: "Grab version number"
27+
id: "get_version"
28+
run: "echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}"
29+
30+
- name: "Build Docker image"
31+
run: "docker build --tag extdn/${{ matrix.actions-with-docker-image }}-action:latest ${{ matrix.actions-with-docker-image }}/."
32+
33+
- name: "Docker Login"
34+
run: "echo ${{ secrets.DOCKER_PASSWORD }} | $(which docker) login --password-stdin --username ${{ env.DOCKER_USERNAME }}"
35+
36+
- name: "Push Docker image (latest)"
37+
run: "docker push extdn/${{ matrix.actions-with-docker-image }}-action:latest"
38+
39+
- name: "Tag Docker image (versioned)"
40+
run: "docker tag extdn/${{ matrix.actions-with-docker-image }}-action extdn/${{ matrix.actions-with-docker-image }}-action:${{steps.get_version.outputs.name}}"
41+
42+
- name: "Push Docker image (versioned)"
43+
run: "docker push extdn/${{ matrix.actions-with-docker-image }}-action:${{steps.get_version.outputs.name}}"
44+
45+
- name: "Docker Logout"
46+
run: "docker logout"

magento-coding-standard/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: 'ExtDN'
33
description: 'performs php static code analysis with the Magento Coding Standard'
44
runs:
55
using: 'docker'
6-
image: 'Dockerfile'
6+
image: 'docker://extdn/magento-coding-standard-action:latest'
77
branding:
88
icon: 'code'
99
color: 'green'

magento-mess-detector/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: 'ExtDN'
33
description: 'performs php static code analysis with the Magento Mess Detector ruleset'
44
runs:
55
using: 'docker'
6-
image: 'Dockerfile'
6+
image: 'docker://extdn/magento-mess-detector-action:latest'
77
branding:
88
icon: 'code'
99
color: 'green'

0 commit comments

Comments
 (0)