Building Docker with GitHub actions #38

Merged
kodxana merged 7 commits from master into master 2022-05-13 22:44:19 +02:00
Showing only changes of commit a42741127b - Show all commits

View file

@ -3,6 +3,10 @@ name: docker
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
repo:
description: 'Repository'
required: false
default: 'lbry/lbcd'
note: note:
description: 'Note' description: 'Note'
required: false required: false
@ -14,7 +18,7 @@ on:
env: env:
# github.repository as <account>/<repo> # github.repository as <account>/<repo>
IMAGE_NAME: lbry/lbcd IMAGE_NAME: ${{ inputs.repo }}
jobs: jobs:
build: build:
@ -50,8 +54,8 @@ jobs:
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# Extract metadata (tags, labels) for Docker # Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action # https://github.com/docker/metadata-action
@ -59,7 +63,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with: with:
images: lbry/lbcd images: ${{ inputs.repo }}
# Build and push Docker image with Buildx (don't push on PR) # Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action