Skip to content

Commit

Permalink
Add workflow to push a development docker image (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
alastair authored Feb 8, 2022
1 parent 95e559c commit 046b9b9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/push-dev-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow can be used to push an image off a branch to Docker Hub.
# This is useful to deploy changes to CB beta for testing.
name: Push development image

on:
workflow_dispatch:
inputs:
tag:
description: 'Docker Image Tag (Version)'
required: true
default: 'beta'

jobs:
dev:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
continue-on-error: true

- uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true

- name: Build development image
run: |
docker build \
--tag metabrainz/critiquebrainz:"${{ github.event.inputs.tag }}" \
--build-arg GIT_COMMIT_SHA="${{ github.sha }}" .
- name: Push development image
run: docker push metabrainz/critiquebrainz:"${{ github.event.inputs.tag }}"

0 comments on commit 046b9b9

Please sign in to comment.