Build & push base #270
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 & push base | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 1 * * *' | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Build image | |
| runs-on: ubuntu-latest | |
| env: | |
| IMAGE_NAME: image | |
| REGISTRY: ghcr.io/queil | |
| steps: | |
| - name: Clone the repository | |
| uses: actions/checkout@v3 | |
| - name: "Fix no space left on device" | |
| run: rm -rf /opt/hostedtoolcache | |
| - name: base | |
| id: base | |
| uses: redhat-actions/buildah-build@v2 | |
| with: | |
| image: ${{ env.IMAGE_NAME }} | |
| tags: latest ${{ github.sha }} | |
| context: . | |
| containerfiles: | | |
| ./images/Containerfile | |
| - name: Log in to the GitHub Container registry | |
| uses: redhat-actions/podman-login@v1 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push base | |
| uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| image: ${{ steps.base.outputs.image }} | |
| tags: ${{ steps.base.outputs.tags }} | |
| registry: ${{ env.REGISTRY }} |