Last active
August 16, 2020 17:39
-
-
Save tonysm/fdeb123bee17790fbdff8efa1719eaee to your computer and use it in GitHub Desktop.
GitHub action for building docker images and patching infrastructure repository - part 01
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: 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