Skip to content

Build Docker test environment #2

Build Docker test environment

Build Docker test environment #2

name: Build Docker test environment
on:
schedule:
# every day at 00:00
- cron: "0 0 * * *"
workflow_dispatch:
env:
REGISTRY: ghcr.io
NAMESPACE: tuna
IMAGE_NAME: thuthesis-test-env
jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
context: "{{defaultContext}}:.github/workflows"
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:latest