Skip to content

Workflow file for this run

name: Release docker image
on:
workflow_dispatch: {}
release:
types: [published]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Build docker images
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: b-scheduler
password: ${{ secrets.PAT }}
- name: Build and push image
id: docker_build_publish
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
file: ./docker/Dockerfile
push: true
tags: |
${{ vars.DOCKERHUB_USERNAME }}/bresourcemanager:latest
ghcr.io/b-scheduler/bresourcemanager:latest
${{ vars.DOCKERHUB_USERNAME }}/bresourcemanager:${{ github.ref_name }}
ghcr.io/b-scheduler/bresourcemanager:${{ github.ref_name }}