Skip to content

feat: market docker builds #6

feat: market docker builds

feat: market docker builds #6

name: Build and Push to Docker Hub
on:
workflow_dispatch:
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/market:$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-') .
docker push arcvouchers/market:$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')