-
-
Notifications
You must be signed in to change notification settings - Fork 234
34 lines (31 loc) · 981 Bytes
/
build_and_push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build & Push Docker image
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build_and_push_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Build Docker image
run: bundle exec rake
# TODO: Only Docker login & push on the push event + master branch
#- name: Retag Docker image
# run: docker tag bitcoincash:latest zquestz/bitcoincash:latest
#- name: Login to Docker Hub
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
# uses: docker/login-action@v2
# with:
# username: zquestz
# password: ${{ secrets.DOCKERHUB_TOKEN }}
#- name: Docker push
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
# run: docker push zquestz/bitcoincash:latest