Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandredevely committed Mar 29, 2024
1 parent 28ee1ac commit 5367ff5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_dispatch:

env:
release: ${{ github.head_ref }}
release: ${{ github.ref_name }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -71,6 +71,9 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: dump github.ref_name
run: echo "${{ github.ref_name }}"

# overwrite previous Dockerfiles
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -167,10 +170,10 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# node make-docs.js --release ${{ github.head_ref }}
# node make-docs.js --release ${{ github.ref_name }}
- name: generate MarkDown files
run: |
node make-docs.js
node make-docs.js --release ${{ github.ref_name }}
- uses: actions/upload-artifact@v4
with:
Expand All @@ -184,15 +187,15 @@ jobs:
token: ${{ secrets.TOKEN_DISPATCH }}
repository: abcdesktopio/docs
event-type: dispatch-from-oc.apps
client-payload: '{ "ref_name": "${{ github.head_ref }}", "repository": "${{ github.repository }}", "run_id": "${{ github.run_id }}", "artifact": "artifact-application-md-files" }'
client-payload: '{ "ref_name": "${{ github.ref_name }}", "repository": "${{ github.repository }}", "run_id": "${{ github.run_id }}", "artifact": "artifact-application-md-files" }'

- name: Repository Dispatch dockerfiles to images
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.TOKEN_DISPATCH }}
repository: abcdesktopio/image
event-type: dispatch-dockerfile-from-oc.apps
client-payload: '{ "ref_name": "${{ github.head_ref }}", "repository": "${{ github.repository }}", "run_id": "${{ github.run_id }}", "artifact": "artifact-dockerfiles" }'
client-payload: '{ "ref_name": "${{ github.ref_name }}", "repository": "${{ github.repository }}", "run_id": "${{ github.run_id }}", "artifact": "artifact-dockerfiles" }'

#- name: commit Dockerfiles and md files
# env:
Expand Down

0 comments on commit 5367ff5

Please sign in to comment.