Darex2094

Forgejo Actions build.yml

Apr 3rd, 2026
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.40 KB | Software | 0 0
  1. name: Build YourAtomic
  2.  
  3. on:
  4.   workflow_dispatch: # Enables you to run the action manually from within the Actions UI
  5.   schedule:
  6.     - cron: "0 0 * * *" # Automatically runs this action at midnight local time.
  7.  
  8. jobs:
  9.   build-and-push:
  10.     runs-on: docker
  11.     container:
  12.       image: quay.io/podman/stable:latest
  13.       # Disables SELinux for the job and injects the host's engine socket and auth token
  14.       options: --privileged --user 0:0 --security-opt label=disable -v /run/podman/podman.sock:/run/podman/podman.sock -v /root/.config/containers/auth.json:/root/.config/containers/auth.json:ro
  15.  
  16.     # Tells the container's internal Podman CLI to forward commands to the host's engine
  17.     env:
  18.       CONTAINER_HOST: unix:///run/podman/podman.sock
  19.       GIT_SSL_NO_VERIFY: "true"
  20.  
  21.     steps:
  22.       - name: Prepare Container Environment
  23.         run: dnf install -y nodejs git
  24.  
  25.       - name: Checkout Repository
  26.         uses: actions/checkout@v4
  27.  
  28.       - name: Build YourAtomic OCI Layers
  29.         run: |
  30.          echo "Compiling and assembling OCI layers for 'latest' using host cache..."
  31.           podman build --pull=always -t your.forgejo.local/you/youratomic:latest .
  32.  
  33.       - name: Push to Forgejo Registry
  34.         run: |
  35.          echo "Pushing YourAtomic 'latest' to Forgejo registry..."
  36.           podman push --authfile /root/.config/containers/auth.json your.forgejo.local/you/youratomic:latest
Advertisement
Add Comment
Please, Sign In to add comment