Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change workflows: add build manually #8

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}