Skip to content

chore(deps): update actions/checkout action to v4 #35

chore(deps): update actions/checkout action to v4

chore(deps): update actions/checkout action to v4 #35

name: Publish LLVM_runner docker image
on:
pull_request:
branches:
- main
types: [closed]
paths:
- "images/llvm_runner/Dockerfile"
- ".github/workflows/build_llvm_runner.yml"
workflow_dispatch:
branches:
- "main"
jobs:
push_to_registry:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
name: Push Docker image to Docker Hub
runs-on: [matterlabs-ci-runner]
steps:
- uses: actions/checkout@v4
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image on merged PR
if: github.event.pull_request.merged == true
uses: docker/build-push-action@v3
with:
push: true
tags: |
matterlabs/llvm_runner:${{ steps.vars.outputs.sha_short }}
matterlabs/llvm_runner:latest
file: images/llvm_runner/Dockerfile
no-cache: true
- name: Build and push Docker image on manual trigger
if: github.event_name == 'workflow_dispatch'
uses: docker/build-push-action@v3
with:
push: true
tags: |
matterlabs/llvm_runner:${{ steps.vars.outputs.sha_short }}
file: images/llvm_runner/Dockerfile
no-cache: true