name: Build and Push Docker Image on: push: branches: [main] jobs: build: runs-on: ubuntu-latest container: image: quay.io/buildah/stable options: --privileged steps: - name: Install Node.js run: dnf install -y nodejs git - uses: actions/checkout@v4 - name: Login to Registry uses: redhat-actions/podman-login@v1 with: registry: git.kocoder.xyz username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_PASSWORD }} - name: Buildah Build id: build-image uses: redhat-actions/buildah-build@v2 with: containerfiles: "Dockerfile" image: vt-be tags: "${{ github.ref_name }} latest" # No extra args needed with privileged mode usually, but isolation=chroot is fine if preferred. - name: Push Docker Images uses: redhat-actions/push-to-registry@v2 with: image: vt-be tags: ${{ steps.build-image.outputs.tags }} registry: git.kocoder.xyz/kocoded username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_PASSWORD }}