name: Copy full images on: workflow_dispatch: inputs: version: type: string default: latest schedule: - cron: 0 12 */7 * * env: SLUG: ${{ github.repository_owner }}/ubuntu PUSH_GHCR: ${{ github.repository == (github.event.pull_request.head.repo.full_name || github.repository) && '1' || '' }} # PUSH_QUAY: ${{ secrets.QUAY_USER && secrets.QUAY_TOKEN && '1' || '' }} PUSH_DOCKER_HUB: ${{ secrets.DOCKER_USER && secrets.DOCKER_TOKEN && '1' || '' }} defaults: run: shell: sh jobs: copy: name: copy image ${{ matrix.copy.src }} runs-on: ubuntu-latest strategy: fail-fast: true max-parallel: 1 matrix: copy: - src: ghcr.io/christopherhx/runner-images:ubuntu24-runner-large-${{ inputs.version || 'latest' }} dest: full-latest - src: ghcr.io/christopherhx/runner-images:ubuntu24-runner-large-${{ inputs.version || 'latest' }} dest: full-24.04 - src: ghcr.io/christopherhx/runner-images:ubuntu22-runner-large-${{ inputs.version || 'latest' }} dest: full-22.04 - src: ghcr.io/christopherhx/runner-images:ubuntu20-runner-large-${{ inputs.version || 'latest' }} dest: full-20.04 steps: - name: Force SLUG to lowercase uses: actions/github-script@v6 with: github-token: n/a script: | core.exportVariable('SLUG', process.env.SLUG.toLowerCase()); - name: Login to GitHub Container Registry if: env.PUSH_GHCR run: skopeo copy -a --src-creds ${{ github.actor }}:${{ github.token }} --dest-creds ${{ github.actor }}:${{ github.token }} docker://${{ matrix.copy.src }} docker://ghcr.io/${{ env.SLUG }}:${{ matrix.copy.dest }} # - name: Login to Quay # if: env.PUSH_QUAY # run: skopeo copy -a --src-creds ${{ github.actor }}:${{ github.token }} --dest-creds ${{ secrets.QUAY_USER }}:${{ secrets.QUAY_TOKEN }} docker://${{ matrix.copy.src }} docker://quay.io/${{ env.SLUG }}:${{ matrix.copy.dest }} - name: Login to Docker Hub if: env.PUSH_DOCKER_HUB run: skopeo copy -a --src-creds ${{ github.actor }}:${{ github.token }} --dest-creds ${{ secrets.DOCKER_USER }}:${{ secrets.DOCKER_TOKEN }} docker://${{ matrix.copy.src }} docker://docker.io/${{ env.SLUG }}:${{ matrix.copy.dest }}