name: build-ws-container
on:
  # auto-refresh every Monday morning
  schedule:
    - cron: '0 2 * * 1'
  # can be run manually on https://github.com/cockpit-project/cockpit/actions
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-22.04
    environment: quay.io
    permissions: {}
    timeout-minutes: 20
    env:
      RUNC: docker

    steps:
      - name: Clone repository
        uses: actions/checkout@v4

      - name: Log into container registry
        run: $RUNC login -u ${{ secrets.QUAY_BOTUSER }} -p ${{ secrets.QUAY_TOKEN }} quay.io

      - name: Build and push ws container
        run: containers/ws/release.sh
