Skip to content

Build Workstation container #503

Build Workstation container

Build Workstation container #503

name: Build Workstation container
on:
push:
branches:
- main
paths:
- images/workstation/**
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get current timestamp
id: time
run: echo "time=$(date +'%s')" >> $GITHUB_OUTPUT
- name: Build and push Docker images
uses: docker/build-push-action@v5.4.0
with:
context: images/workstation/
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/behnh/workstation:latest,
ghcr.io/behnh/workstation:auto-${{ steps.time.outputs.time }}
push: ${{ github.ref == 'refs/heads/main' }}