Support specifying command for services #50

Merged
wolfogre merged 1 commits from Zettat123/act:services-cmd into main 2023-04-23 06:55:18 +00:00
Member

This PR is to support overwriting the default CMD command of services containers.

This is a Gitea specific feature and GitHub Actions doesn't support this syntax.

This PR is to support overwriting the default `CMD` command of `services` containers. This is a Gitea specific feature and GitHub Actions doesn't support this syntax.
Zettat123 added 1 commit 2023-04-22 10:01:49 +00:00
support cmd
Some checks failed
checks / check and test (pull_request) Failing after 26s
088c04093b
Zettat123 force-pushed services-cmd from 088c04093b to 9eaf6c4fcb 2023-04-23 03:43:32 +00:00 Compare
Zettat123 changed title from WIP: Support specifying command for `services` to Support specifying command for `services` 2023-04-23 04:08:44 +00:00
Author
Member

My test:

name: Services Cmd
on: push
jobs:
  test-services-cmd:
    runs-on: ubuntu-latest
    container:
      image: alpine
    steps:
      - name: Install psql
        run: apk add postgresql
      - name: Test postgres
        run: PGPASSWORD=gitea psql -U giteapg -h postgres -p 9981 -c "SELECT log(100)"
    services:
      postgres:
        image: postgres:15
        env: 
          POSTGRES_USER: giteapg
          POSTGRES_PASSWORD: gitea
        cmd: 
          - 'postgres'
          - '-c'
          - 'port=9981'

image

My test: ```yml name: Services Cmd on: push jobs: test-services-cmd: runs-on: ubuntu-latest container: image: alpine steps: - name: Install psql run: apk add postgresql - name: Test postgres run: PGPASSWORD=gitea psql -U giteapg -h postgres -p 9981 -c "SELECT log(100)" services: postgres: image: postgres:15 env: POSTGRES_USER: giteapg POSTGRES_PASSWORD: gitea cmd: - 'postgres' - '-c' - 'port=9981' ``` ![image](/attachments/2a1f36c1-9670-4628-bac4-34309a3ab830)
9.0 KiB
wolfogre approved these changes 2023-04-23 06:55:04 +00:00
wolfogre merged commit 0c1f2edb99 into main 2023-04-23 06:55:18 +00:00
Owner
https://github.com/orgs/community/discussions/52675
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act#50
No description provided.