cat test.yml
name: Java
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: checking vars
run: |
ls -la
echo "This is " > buildinfo.txt
- name: Upload buildinfo file as artifact
uses: actions/upload-artifact@v4
with:
name: versioninfoartifact
path: buildinfo.txt
retention-days: 7
cat test1.yml
name: Deploy
on:
workflow_run:
workflows: Java
types: [completed]
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: "Java"
name: versioninfoartifact
Originally posted by @thatsk in #302