Skip to content

Commit

Permalink
Merge pull request #8 from mh739025250/main
Browse files Browse the repository at this point in the history
change workflows: add build manually
  • Loading branch information
mh739025250 authored May 19, 2022
2 parents 9a979a9 + 598a898 commit e0baa26
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/docker-build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name:
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
Expand All @@ -27,4 +33,4 @@ jobs:
with:
context: .
push: true
tags: deltampc/delta-contracts:dev
tags: deltampc/delta-contracts:dev-${{ steps.vars.outputs.sha_short }}
37 changes: 37 additions & 0 deletions .github/workflows/docker-build-manually.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build docker image dev manually
on:
workflow_dispatch:
inputs:
name:
description: 'build manually trigger'
required: true
default: 'triggered by developer'
home:
description: 'location'
required: false
default: 'The developer team'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name:
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: deltampc/delta-contracts:dev-${{ steps.vars.outputs.sha_short }}

0 comments on commit e0baa26

Please sign in to comment.