Scheduled Publish #238
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: Scheduled Publish | |
| on: | |
| schedule: | |
| - cron: '22 3 * * 0' | |
| workflow_dispatch: | |
| env: | |
| BASE_DEVEL_IMG: base-devel | |
| LATEST_IMG: latest | |
| BASE_IMG: base | |
| # IMPORTANT NOTE: The first time this automation is run, the invoked container in "image" field must access to Athena and Chaotic repositories otherwise | |
| # when the building image tries to install chaotic-mirrorlist, it cannot find the package because the invoked container is not linked to its repository. | |
| # It is the case where the original athenaos/base-devel image in Docker Hub is corrupted or has been pushed an image with no repositories reported above. | |
| # In this case, just push the Athena Base-devel image atleast one time to Docker by using your local Athena machine with Athena and Chaotic repositories enabled. | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: athenaos/base-devel:latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set fastest mirrors | |
| run: | | |
| pacman -Syyu --noconfirm reflector | |
| curl https://archlinux.org || true | |
| reflector --age 6 --connection-timeout 15 --download-timeout 15 --latest 21 --fastest 21 --threads 21 --sort rate --protocol https --save /etc/pacman.d/mirrorlist | |
| - name: Install dependencies | |
| run: pacman -Syyu --noconfirm --needed make docker docker-buildx devtools fakeroot fakechroot | |
| - name: Build base | |
| run: | | |
| make athena-base | |
| docker tag athenaos/base docker.io/athenaos/$BASE_IMG:$LATEST_IMG | |
| - name: Build base-devel | |
| run: | | |
| make athena-base-devel | |
| docker tag athenaos/base-devel docker.io/athenaos/$BASE_DEVEL_IMG:$LATEST_IMG | |
| - name: Log into registry | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USER }} | |
| password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| - name: Push image | |
| run: | | |
| docker push docker.io/athenaos/$BASE_IMG:$LATEST_IMG | |
| docker push docker.io/athenaos/$BASE_DEVEL_IMG:$LATEST_IMG |