Skip to content

push-new-image

push-new-image #22

name: push-new-image
on:
workflow_dispatch:
inputs:
version:
required: true
jobs:
push-new-image:
runs-on: ubuntu-latest
steps:
- name: Extract short version
run: |
version_short=$(echo ${{ inputs.version }} | awk -F "." '{print $1 "." $2 "." $3}')
echo "version_short=$version_short" >> $GITHUB_ENV
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_WRITE_PAT }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:${{ env.version_short }}"
push: true
tags: newrelic/php-daemon:latest,newrelic/php-daemon:${{ env.version_short }}
platforms: linux/amd64,linux/arm64