Skip to content

Release dockman Agent #1

Release dockman Agent

Release dockman Agent #1

Workflow file for this run

name: Release Dockside Agent
on:
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Get short commit hash
id: vars
run: echo "::set-output name=short_sha::$(echo $GITHUB_SHA | cut -c1-7)"
- name: Build and push Docker image with inline cache
uses: docker/build-push-action@v5
with:
context: .
dockerfile: ./Dockerfile-agent
platforms: linux/amd64
push: true
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/dockside:cache
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/dockside:cache,mode=max
tags: |
ghcr.io/${{ github.repository_owner }}/dockside-agent:latest
ghcr.io/${{ github.repository_owner }}/dockside-agent:${{ steps.vars.outputs.short_sha }}