Skip to content

Instantly share code, notes, and snippets.

@tonysm
Last active August 16, 2020 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonysm/fdeb123bee17790fbdff8efa1719eaee to your computer and use it in GitHub Desktop.
Save tonysm/fdeb123bee17790fbdff8efa1719eaee to your computer and use it in GitHub Desktop.
GitHub action for building docker images and patching infrastructure repository - part 01
name: Build Docker Images
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get release version
id: get_version
run: echo ::set-env name=RELEASE_NAME::$(echo ${GITHUB_SHA:0:7})
- name: Publish PHP image to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: tonysm/docker4laravelapp-php
dockerfile: .docker/php/prod.Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ env.RELEASE_NAME }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment