Skip to content

update actions

update actions #24

name: Automatic build and publish docker image
on:
push:
branches:
- main
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Build image
run: make docker-build VERSION=latest
- name: Log in to Docker registry
run: |
echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login ${{ vars.DOCKER_REGISTRY_URL }} -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} --password-stdin
- name: Tag image
run: |
docker tag ${{ vars.DOCKER_IMAGE_NAME }}:latest ${{ vars.DOCKER_REGISTRY_URL }}/${{ vars.DOCKER_IMAGE_NAME }}:latest
- name: Push image to Docker registry
run: |
docker push ${{ vars.DOCKER_REGISTRY_URL }}/${{ vars.DOCKER_IMAGE_NAME }}:latest