mango-feeds/.github/workflows/docker-publish.yml

54 lines
1.2 KiB
YAML

name: Publish Docker Image
# ping2
on:
push:
branches:
- main
env:
IMAGE: mango-feeds
ORG: blockworks-foundation
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
# Use docker buildx
- name: Use docker buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
buildkitd-flags: --debug
# Login to Registry
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build and push the image
- name: Build and Push Image
uses: docker/build-push-action@v2
run: |
source ci/rust-version.sh
with:
context: .
args: ${{ env.RUST_STABLE }}
push: true
tags: |
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }}:${{ github.sha }}
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max