Skip to content

Build and push docker image #3

Build and push docker image

Build and push docker image #3

Workflow file for this run

name: Build and push docker image
on:
workflow_run:
workflows: [ "Build and Release" ]
types: [ completed ]
workflow_dispatch:
inputs:
tag:
description: 'Image tag to build and push'
required: true
default: 'latest'
permissions:
contents: read
env:
image_tag: ${{ github.event.inputs.tag || github.event.workflow_run.head_branch || 'latest' }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
rustfs/rc:${{ env.image_tag }}
rustfs/rc:latest