Build Coding Standard Images #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |