Build #401
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 | |
on: | |
schedule: | |
- cron: "21 21 * * *" | |
push: | |
branches: ["main"] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: "jmarrero-silverblue" | |
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
REGISTRY_USER: ${{ github.actor }} | |
REGISTRY_PASSWORD: ${{ github.token }} | |
jobs: | |
podman-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Build container image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
context: "." | |
containerfiles: Dockerfile | |
image: ${{ env.IMAGE_NAME }} | |
layers: false | |
oci: true | |
- name: Push to ghcr.io | |
uses: redhat-actions/push-to-registry@v2.6 | |
with: | |
image: ${{ env.IMAGE_NAME }} | |
tags: "latest" | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ env.REGISTRY_USER }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
extra-args: | | |
--disable-content-trust | |
# docker-buildx: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# - name: Set up Docker Buildx | |
# id: buildx | |
# uses: docker/setup-buildx-action@v2 | |
# - name: Login to dhcr.io | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Build container image and push to ghcr.io | |
# uses: docker/build-push-action@v3 | |
# with: | |
# context: . | |
# tags: | | |
# "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:docker-latest" | |
# push: ${{ github.ref == 'refs/heads/main' }} |