Update to Ubuntu 24 #20
Workflow file for this run
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 images | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build-linux: | |
| uses: ./.github/workflows/define-build-linux-image.yaml | |
| secrets: inherit | |
| push: | |
| needs: [build-linux] | |
| runs-on: [self-hosted, linux] | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: lowercase github.repository | |
| run: | | |
| echo "IMAGE_NAME=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >>${GITHUB_ENV} | |
| - name: Download cached docker image | |
| run: | | |
| curl -X GET http://192.168.0.11:25000/attachments/gha-runner/1/image_ubuntu.tar -o /tmp/image_ubuntu.tar | |
| - name: Load image | |
| run: | | |
| docker load --input /tmp/image_ubuntu.tar | |
| - name: Push | |
| run: | | |
| docker tag ${{ env.IMAGE_NAME }}:latest-ubuntu ghcr.io/${{ env.IMAGE_NAME }}:dev | |
| docker push ghcr.io/${{ env.IMAGE_NAME }}:dev | |
| - name: Remove local image | |
| if: always() | |
| run: | | |
| docker image rm ${{ env.IMAGE_NAME }}:latest-ubuntu | |
| - name: Remove cached docker image | |
| if: always() | |
| run: | | |
| curl -X DELETE http://192.168.0.11:25000/attachments/gha-runner/1/image_ubuntu.tar |