Skip to content

Merge branch 'dev/docker' into dev/dockers #2

Merge branch 'dev/docker' into dev/dockers

Merge branch 'dev/docker' into dev/dockers #2

name: Build and Push to Docker Hub

Check failure on line 1 in .github/workflows/build-and-push-to-dockerhub.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-push-to-dockerhub.yml

Invalid workflow file

`merge` is not a valid event name
on:
merge:
branches:
- '*'
push:
branches:
- '*'
pull_request:
types:
- 'opened'
- 'synchronize'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build and push Docker image
run: |
docker build -t arcvouchers/service:$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-') .
docker push arcvouchers/service:$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')