Skip to content

Update docker-ci-demo.yml #2

Update docker-ci-demo.yml

Update docker-ci-demo.yml #2

name: Push Docker Image to Docker Hub
on:
push:
branches:
- 'master'
tags:
- '**'
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: osgeum/nodejs-ci
tag-semver: |
{{version}}
{{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}