Github Action fix? #1262
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build OS Content | |
| on: | |
| schedule: | |
| - cron: '0 5 * * *' | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: {} | |
| env: | |
| REGISTRY_USER: aleskandrox | |
| IMAGE_REGISTRY: quay.io | |
| IMAGE_NAME: fedora | |
| REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | |
| jobs: | |
| build-os-content: | |
| runs-on: ubuntu-latest | |
| name: Build and Push Fedora ${{ matrix.variant }} (OS Content) | |
| strategy: | |
| matrix: | |
| variant: | |
| - silverblue | |
| - kinoite | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Free up space | |
| run: | | |
| echo "==============================================================================" | |
| echo "Freeing up disk space on CI system" | |
| echo "==============================================================================" | |
| echo "Listing 100 largest packages" | |
| dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100 | |
| df -h | |
| echo "Removing large packages" | |
| sudo apt-get remove -y '^ghc-8.*' | |
| sudo apt-get remove -y '^dotnet-.*' | |
| sudo apt-get remove -y '^llvm-.*' | |
| sudo apt-get remove -y 'php.*' | |
| sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel | |
| sudo apt-get autoremove -y | |
| sudo apt-get clean | |
| df -h | |
| echo "Removing large directories" | |
| # deleting 15GB | |
| rm -rf /usr/share/dotnet/ | |
| df -h | |
| - name: Set versioned tag | |
| id: versioned-tag | |
| run: | | |
| VERSIONED_TAG=$(date -u --iso-8601=minutes | sed 's/://g;s/+.*$//')-${GITHUB_SHA} | |
| echo "VERSIONED_TAG=${VERSIONED_TAG}" >> $GITHUB_OUTPUT | |
| - name: Build OS content | |
| uses: redhat-actions/buildah-build@v2 | |
| id: build-image | |
| with: | |
| image: ${{ env.IMAGE_REGISTRY }}/${{ env.REGISTRY_USER }}/${{ env.IMAGE_NAME }} | |
| oci: true | |
| layers: true | |
| tags: ${{ matrix.variant }}-custom ${{ matrix.variant }}-custom-${{ steps.versioned-tag.outputs.VERSIONED_TAG }} | |
| containerfiles: | | |
| ./os_desktop.Containerfile | |
| build-args: | | |
| BASE_REPO=quay.io/fedora/fedora-${{ matrix.variant }} | |
| TOOLBOX_IMAGE=quay.io/aleskandrox/fedora:toolbox | |
| - name: Push to registry | |
| uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| tags: >- | |
| ${{ env.IMAGE_REGISTRY }}/${{ env.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-custom | |
| ${{ env.IMAGE_REGISTRY }}/${{ env.REGISTRY_USER }}/${{ env.IMAGE_NAME }}:${{ matrix.variant }}-custom-${{ steps.versioned-tag.outputs.VERSIONED_TAG }} | |
| username: ${{ env.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |