Skip to content

fix: include Cargo.lock for reproducible builds #2

fix: include Cargo.lock for reproducible builds

fix: include Cargo.lock for reproducible builds #2

name: Docker Publish
on:
push:
branches: [main]
paths:
- 'docker/**'
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
env:
REGISTRY: ghcr.io
jobs:
build-and-push:
name: Build and Push Docker Images
runs-on: blacksmith-4vcpu-ubuntu-2204
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push term-executor (dev)
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/platformnetwork/term-executor:dev
${{ env.REGISTRY }}/platformnetwork/term-executor:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push term-agent (dev)
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.agent
push: true
tags: |
${{ env.REGISTRY }}/platformnetwork/term-agent:dev
${{ env.REGISTRY }}/platformnetwork/term-agent:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max