Skip to content

Commit

Permalink
[DockerImages] Change readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Arminek committed Nov 5, 2021
1 parent 6f29dd2 commit 6a00c36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 77 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
paths-ignore:
- "docs/**"
- "*.md"

env:
REGISTRY: ghcr.io
Expand Down
79 changes: 2 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,83 +6,8 @@ It is repository with base images of node & php
- [docker](https://www.docker.com/)

```yaml
build-and-publish-php-image:
strategy:
matrix:
php: [ "7.4-fpm", "8.0-fpm" ]
runs-on: ubuntu-20.04
name: "Build & publish sylius base php docker image - php:${{ matrix.php }}"
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.PHP_IMAGE_NAME }}
tags: |-
type=sha,enable=true,priority=100,prefix=${{ matrix.php }}-sha-,suffix=,format=short
type=ref,event=branch,prefix=${{ matrix.php }}-
type=semver,prefix=${{ matrix.php }}-,pattern={{version}}
- name: Build and push Docker php image
uses: docker/build-push-action@v2
with:
context: php/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PHP_BASE_IMAGE_TAG=${{ matrix.php }}
cache-from: type=gha
cache-to: type=gha,mode=max

build-and-publish-node-image:
strategy:
matrix:
node: [ "12-slim" ]
runs-on: ubuntu-20.04
name: "Build & publish sylius base node docker image - node:${{ matrix.node }}"
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.NODE_IMAGE_NAME }}
tags: |-
type=sha,enable=true,priority=100,prefix=${{ matrix.node }}-sha-,suffix=,format=short
type=ref,event=branch,prefix=${{ matrix.node }}-
type=semver,prefix=${{ matrix.node }}-,pattern={{version}}
- name: Build and push Docker node image
uses: docker/build-push-action@v2
with:
context: node/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NODE_BASE_IMAGE_TAG=${{ matrix.node }}
cache-from: type=gha
cache-to: type=gha,mode=max
docker pull ghcr.io/sylius/docker-images-php:latest
docker pull ghcr.io/sylius/docker-images-node:latest
```

If you have any questions please do not hesitate to contact me [Arminek](https://github.com/Arminek)

0 comments on commit 6a00c36

Please sign in to comment.