-
Notifications
You must be signed in to change notification settings - Fork 46
56 lines (44 loc) · 1.69 KB
/
coding-standard-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build Coding Standard Images
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * 0" # 6 AM Weekly
push:
branches:
- master
paths:
- 'magento-coding-standard/**'
jobs:
build:
name: "Build and deploy"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.3"
- "7.4"
- "8.1"
- "8.2"
- "8.3"
actions-with-docker-image:
- "magento-coding-standard"
env:
DOCKER_USERNAME: "extdn"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Grab version number"
uses: "olegtarasov/[email protected]"
id: "tagName"
- name: "Build Docker image"
run: "docker build --tag extdn/${{ matrix.actions-with-docker-image }}-action:${{ matrix.php-version }}-latest ${{ matrix.actions-with-docker-image }}/. -f ${{ matrix.actions-with-docker-image }}/Dockerfile:${{ matrix.php-version }}"
- name: "Docker Login"
run: "echo ${{ secrets.DOCKER_PASSWORD }} | $(which docker) login --password-stdin --username ${{ env.DOCKER_USERNAME }}"
- name: "Push Docker image (latest)"
run: "docker push extdn/${{ matrix.actions-with-docker-image }}-action:${{ matrix.php-version }}-latest"
#- name: "Tag Docker image (versioned)"
# run: "docker tag extdn/${{ matrix.actions-with-docker-image }}-action extdn/${{ matrix.actions-with-docker-image }}-action:${{ steps.tagName.outputs.tag }}"
#- name: "Push Docker image (versioned)"
# run: "docker push extdn/${{ matrix.actions-with-docker-image }}-action:${{ steps.tagName.outputs.tag }}"
- name: "Docker Logout"
run: "docker logout"