Files
go/.gitea/workflows/build.yml
KoCoder 707c3927fb
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m5s
Push with creds
2026-05-16 15:55:38 +02:00

41 lines
1.2 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches: [main]
permissions:
packages: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
container:
image: quay.io/buildah/stable
options: --security-opt seccomp=unconfined --security-opt apparmor=unconfined --device /dev/fuse:rw --privileged
env:
BUILDAH_ISOLATION: chroot
STORAGE_DRIVER: vfs
steps:
- name: Install Node.js
run: dnf install -y nodejs git
- uses: actions/checkout@v4
- name: Login to Registry
run: buildah login -u "${{ secrets.PACKAGES_USER }}" -p "${{ secrets.PACKAGES_TOKEN }}" git.kocoder.xyz
- name: Buildah Build
run: |
buildah build -t ${{ github.sha }} .
buildah tag ${{ github.sha }} latest
- name: Push Docker Images
run: |
buildah push --creds=${{ secrets.PACKAGES_USER }}:${{ secrets.PACKAGES_TOKEN }} ${{ github.sha }} docker://git.kocoder.xyz/workspaces/go-workspace:${{ github.sha }}
buildah push --creds=${{ secrets.PACKAGES_USER }}:${{ secrets.PACKAGES_TOKEN }} ${{ github.sha }} docker://git.kocoder.xyz/workspaces/go-workspace:latest