Skip to content

Build Docker test environment #304

Build Docker test environment

Build Docker test environment #304

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@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
context: "{{defaultContext}}:.github/workflows"
tags: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}:latest