Skip to content

Remove build file

Remove build file #2

name: Build on push to experiment
on:
push:
branches: [ experiment ]
jobs:
build_commit:
runs-on: ubuntu-latest
environment: docker
steps:
- uses: actions/checkout@v2
- name: Get shortsha
id: vars
run: |
if [ -z "$EVENT_SHA" ]; then SHORT_SHA=${GITHUB_SHA::8}; else SHORT_SHA=${EVENT_SHA::8}; fi
echo ::set-output name=sha_short::${SHORT_SHA}
env:
EVENT_SHA: ${{ github.event.client_payload.sha }}
- name: Print shortsha
run: |
echo $SHORTSHA
env:
SHORTSHA: ${{ steps.vars.outputs.sha_short }}
- uses: mr-smithers-excellent/docker-build-push@v3
name: Build & push commit tagged Docker image
with:
image: ${{ secrets.DOCKERHUB_REPO }}
tag: ${{ steps.vars.outputs.sha_short }}
registry: docker.io
dockerfile: Dockerfile
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: mr-smithers-excellent/docker-build-push@v3
name: Build & push commit tagged Docker image
with:
image: ${{ secrets.DOCKERHUB_REPO }}
tag: latest
registry: docker.io
dockerfile: Dockerfile
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}