Updated workflows
parent
0eb40826ad
commit
759c85e4bb
|
@ -8,15 +8,29 @@ jobs:
|
||||||
build_push:
|
build_push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: git.gertjankrol.nl/docker/toolkit:latest
|
container: git.gertjankrol.nl/docker/toolkit:latest
|
||||||
env:
|
|
||||||
REGISTRY: git.gertjankrol.nl
|
|
||||||
IMAGE_NAMESPACE: docker/php
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Docker login
|
- name: Docker login
|
||||||
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} https://${REGISTRY}
|
uses: actions/docker-login@v2
|
||||||
- name: Build and push containers
|
with:
|
||||||
run: |
|
registry: ${{secrets.DOCKER_REGISTRY}}
|
||||||
docker build . -t ${REGISTRY}/${IMAGE_NAMESPACE}:${{ github.ref_name }} --push
|
username: ${{secrets.DOCKER_USERNAME}}
|
||||||
docker build . -f Dockerfile-fpm -t ${REGISTRY}/${IMAGE_NAMESPACE}:${{ github.ref_name }}-fpm --push
|
password: ${{secrets.DOCKER_PASSWORD}}
|
||||||
|
- name: Build and push PHP image
|
||||||
|
uses: actions/docker-build-push@v4
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
${{secrets.DOCKER_REGISTRY}}/${{github.repository}}:${{github.ref_name}}
|
||||||
|
${{secrets.DOCKER_REGISTRY}}/${{github.repository}}:latest
|
||||||
|
push: true
|
||||||
|
- name: Build and push PHP-FPM image
|
||||||
|
uses: actions/docker-build-push@v4
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
${{secrets.DOCKER_REGISTRY}}/${{github.repository}}-fpm:${{github.ref_name}}
|
||||||
|
${{secrets.DOCKER_REGISTRY}}/${{github.repository}}-fpm:latest
|
||||||
|
file: Dockerfile-fpm
|
||||||
|
push: true
|
||||||
|
# env:
|
||||||
|
# ACTIONS_RUNTIME_TOKEN: '' #https://gitea.com/gitea/act_runner/issues/119#issuecomment-738294
|
||||||
|
|
|
@ -11,11 +11,18 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Build containers
|
- name: Build PHP image
|
||||||
run: |
|
uses: actions/docker-build-push@v4
|
||||||
docker build . -t php-test:${{ github.ref_name }}
|
with:
|
||||||
docker build . -f Dockerfile-fpm -t php-test:${{ github.ref_name }}-fpm
|
tags: php-test:${{github.ref_name}}
|
||||||
- name: Default image details
|
push: false
|
||||||
|
- name: PHP image details
|
||||||
run: docker image inspect php-test:${{github.ref_name}}
|
run: docker image inspect php-test:${{github.ref_name}}
|
||||||
- name: FPM image details
|
- name: Build PHP-FPM image
|
||||||
run: docker image inspect php-test:${{ github.ref_name }}-fpm
|
uses: actions/docker-build-push@v4
|
||||||
|
with:
|
||||||
|
tags: php-test-fpm:${{github.ref_name}}
|
||||||
|
file: Dockerfile-fpm
|
||||||
|
push: false
|
||||||
|
- name: PHP-FPM image details
|
||||||
|
run: docker image inspect php-test-fpm:${{github.ref_name}}
|
||||||
|
|
Loading…
Reference in New Issue