A forgejo action to build and push
Find a file
Ryan Saebu a4f207b87e
All checks were successful
/ test-workflow (push) Successful in 14s
no ''
2025-10-11 09:15:53 +02:00
.forgejo/workflows no docker cache 2025-10-11 09:15:07 +02:00
src no '' 2025-10-11 09:15:53 +02:00
test build test args 2025-10-11 09:14:11 +02:00
.gitignore build and push using rust 2025-09-17 09:58:06 +02:00
.rustfmt.toml build and push using rust 2025-09-17 09:58:06 +02:00
action.yml fix description 2025-09-22 10:17:26 +02:00
Cargo.lock build and push using rust 2025-09-17 09:58:06 +02:00
Cargo.toml build and push using rust 2025-09-17 09:58:06 +02:00
Containerfile fix containerfile 2025-09-22 10:12:51 +02:00
README.md fix missing ref 2025-09-17 15:46:17 +02:00

Build and push action

Simplest usage

jobs:
  build-and-push:
    runs-on: docker
    steps:
      - uses: actions/checkout@v3
      - uses: https://git.devd.pw/Ryan/build-and-push@main
        with:
          image: my-image
          tags: latest v1.0.0

Different context

jobs:
  build-and-push:
    runs-on: docker
    steps:
      - uses: actions/checkout@v3
      - uses: https://git.devd.pw/Ryan/build-and-push@main
        with:
          image: my-image/frontend
          tags: latest v1.0.0
          file: ./frontend/Containerfile
          context: ./frontend

Different repository

jobs:
  build-and-push:
    runs-on: docker
    steps:
      - uses: actions/checkout@v3
      - uses: https://git.devd.pw/Ryan/build-and-push@main
        with:
          image: my-image
          tags: latest v1.0.0
          repository: cr.devd.pw/private
          username: ${{ vars.CR_PRIVATE_USERNAME }}
          password: ${{ vars.CR_PRIVATE_PASSWORD }}

Build args

jobs:
  build-and-push:
    runs-on: docker
    steps:
      - uses: actions/checkout@v3
      - uses: https://git.devd.pw/Ryan/build-and-push@main
        with:
          image: my-image
          tags: latest v1.0.0
          build-args: |
            ARG1=value1
            ARG2=value2