Build the container image #809
This file contains 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 the container image | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
podman: | |
runs-on: ubuntu-latest | |
name: Build the container with buildah | |
steps: | |
- uses: actions/checkout@v3 | |
- run: buildah bud --layers . | |
docker: | |
runs-on: ubuntu-latest | |
name: Build and publish the container with docker | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push the image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64 | |
push: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/tags/') }} | |
tags: | | |
ghcr.io/suse/bci-dockerfile-generator:latest |