Skip to content
name: Build and Publish Juneo Docker Image
on:
pull_request:
branches:
- socorta
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Get image name and version from release file
id: get_info
run: |
echo "::set-output name=image_name::$(grep 'image_name =' release | cut -d'=' -f2 | tr -d ' \"')"
echo "::set-output name=version::$(grep 'version =' release | cut -d'=' -f2 | tr -d ' \"')"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GIT_USER }}
password: ${{ secrets.GIT_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/staketab/juneo-docker/${{ steps.get_info.outputs.image_name }}:${{ steps.get_info.outputs.version }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}