Test Build #62
Workflow file for this run
This file contains hidden or 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: Test Build | |
on: | |
workflow_dispatch: | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout code with full history | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Extract short commit SHA | |
run: echo "SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-4)" >> $GITHUB_ENV | |
- name: Log in to GHCR | |
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build and push PHP-FPM image | |
run: | | |
docker build -f docker/phpfpm/Dockerfile.Prod \ | |
-t ghcr.io/jymarkb/symfony-blog-phpfpm:${{ env.SHORT_SHA }} . | |
docker push ghcr.io/jymarkb/symfony-blog-phpfpm:${{ env.SHORT_SHA }} | |
- name: Build and push Nginx image | |
run: | | |
docker pull ghcr.io/jymarkb/symfony-blog-phpfpm:${{ env.SHORT_SHA }} | |
docker build -f docker/nginx/Dockerfile.Prod \ | |
--build-arg PHP_FPM_TAG=${{ env.SHORT_SHA }} \ | |
-t ghcr.io/jymarkb/symfony-blog-nginx:${{ env.SHORT_SHA }} . | |
docker push ghcr.io/jymarkb/symfony-blog-nginx:${{ env.SHORT_SHA }} |