Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

add docker push ability #1

add docker push ability

add docker push ability #1

Workflow file for this run

name: docker push
on:
pull_request:
push:
tags:
- '*'
branches:
- main
jobs:
docker-push:
name: build and push docker image
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: setup
run: |
LDFLAGS="$(make ci-print-ldflags)"
echo "LDFLAGS=${LDFLAGS}">>$GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: docker build and push
uses: docker/build-push-action@v5
with:
push: true
build-args:
ldflags=${{ env.LDFLAGS }}