xcube docker build #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: xcube docker build | |
on: | |
workflow_dispatch: | |
env: | |
APP_NAME: xcube | |
ORG_NAME: bcdev | |
IMG_REG_NAME: quay.io | |
jobs: | |
build-docker-image-and-push: | |
runs-on: ubuntu-latest | |
# Build the docker image and push to quay.io | |
name: build-docker-image | |
steps: | |
- name: git-checkout | |
uses: actions/checkout@v2 | |
# Determine release tag from git ref | |
- name: get-release-tag | |
id: release | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/} | |
# Print some info | |
- name: info | |
id: info | |
run: | | |
echo "TAG: ${{ steps.release.outputs.tag }}" | |
echo "EVENT: ${{ github.event_name }}" | |
# Build and push docker release to quay.io | |
- name: push-docker-image-with-release-tag | |
uses: mr-smithers-excellent/docker-build-push@v5 | |
with: | |
image: ${{ env.ORG_NAME }}/${{ env.APP_NAME }} | |
tags: ${{ steps.release.outputs.tag }} | |
registry: ${{ env.IMG_REG_NAME }} | |
username: ${{ secrets.IMG_REG_USERNAME }} | |
password: ${{ secrets.IMG_REG_PASSWORD }} |