Skip to content

Add GitHub actions

Add GitHub actions #1

Workflow file for this run

on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $(echo $GITHUB_REF | rev | cut -d/ -f1 | rev)
- name: Docker login
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image
run: docker push $(echo $GITHUB_REF | rev | cut -d/ -f1 | rev)