name: build-ws-container
on:
  # 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@v3

      - 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

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@v3

      - 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

Refresh cockpit/ws container every Monday
workflows: Refresh cockpit/ws container every Monday

This brings back automatic releases. As we now build from pure Fedora,
we cannot predict when they actually make it through bodhi. But
refreshing them every week is good enough in most cases (and if not, we
can still trigger a manual refresh).

It's also desirable to refresh the container image regularly even if
there is no new cockpit upstream release -- it can then still pick up
Fedora security fixes in other packages.
