trigger docker build for experimental-github-actions tag #54
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: Publish Docker Image | |
# ping2 | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- experimental-github-actions | |
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 | |
- name: Set rust version | |
run: | | |
source ci/rust-version.sh | |
echo "RUST_STABLE=$rust_stable" | tee -a $GITHUB_ENV | |
# 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 | |
with: | |
context: . | |
build-args: | | |
RUST_TOOLCHAIN_VERSION=${{ 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 |