Build & Push apex-atomic #3
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 apex-atomic | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 5 * * 1" # Weekly rebuild — picks up base updates | |
| workflow_dispatch: | |
| env: | |
| IMAGE_NAME: apex-atomic | |
| REGISTRY: ghcr.io/${{ github.repository_owner }} | |
| jobs: | |
| build-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build image with buildah | |
| id: build | |
| uses: redhat-actions/buildah-build@v2 | |
| with: | |
| image: ${{ env.IMAGE_NAME }} | |
| tags: latest | |
| containerfiles: ./Containerfile | |
| oci: true | |
| - name: Push to GHCR | |
| uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| image: ${{ steps.build.outputs.image }} | |
| tags: ${{ steps.build.outputs.tags }} | |
| registry: ${{ env.REGISTRY }} | |
| - name: Print digest | |
| run: | | |
| echo "✅ Pushed: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" |