Skip to content

fix docker login

fix docker login #3

Workflow file for this run

name: Docker Build & Release
on:
workflow_dispatch:
push:
branches:
- master
tags:
- 'v*.*'
schedule:
- cron: '30 2 * * 1,3,5'
jobs:
gettag:
runs-on: ubuntu-latest
steps:
- name: Set UUID
id: generate-uuid
run: echo "uuid=${{ github.sha }}" >> $GITHUB_OUTPUT
outputs:
uuid: ${{ steps.generate-uuid.outputs.uuid }}
build:
needs: [gettag]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{secrets.HUB_USERNAME}}
password: ${{secrets.HUB_TOKEN}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker config.json
run: |
echo '${{ secrets.AUTH_JSON }}' > auth.json
env:
AUTH_JSON: ${{ secrets.AUTH_JSON }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: php/8.2-fpm/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/effiana/php-8.2-fpm:${{needs.gettag.outputs.uuid}}
ghcr.io/effiana/php-8.2-fpm:latest
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: php/8.2-supervisor/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/effiana/php-8.2-supervisor:${{needs.gettag.outputs.uuid}}
ghcr.io/effiana/php-8.2-supervisor:latest