Skip to content

Merge pull request #101 from zpqrtbnk/dependabot/npm_and_yarn/dot-git… #45

Merge pull request #101 from zpqrtbnk/dependabot/npm_and_yarn/dot-git…

Merge pull request #101 from zpqrtbnk/dependabot/npm_and_yarn/dot-git… #45

Workflow file for this run

#
# Workflow: Build Branch
#
name: Build Branch
on: push
jobs:
ensure-repo:
name: "Ensure Repository"
runs-on: ubuntu-latest
if: github.repository == 'zpqrtbnk/test-repo'
steps:
- name: Report
shell: bash
run: echo "Repository is ${{ github.repository }}"
build:
name: "Build Branch"
runs-on: ubuntu-latest
needs: ensure-repo
steps:
- name: Step
shell: bash
run: |
echo "Branch"
if [ -z "${{ secrets.SOME_SECRET_TOKEN }}" ]; then
echo "SECRET IS ABSENT"
else
echo "SECRET IS PRESENT"
fi
create-artifact:
runs-on: ubuntu-latest
needs: build
steps:
- run: mkdir -p path/to/artifact
- run: echo "hello" > path/to/artifact/world.txt
- uses: actions/upload-artifact@master
with:
name: my-artifact
path: path/to/artifact
list-artifacts:
runs-on: ubuntu-latest
needs: create-artifact
steps:
- uses: actions/github-script@v6
with:
script: |
const restapi = github.rest
var artifacts = await restapi.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.run_id }},
});
console.log(artifacts)
get-artifact:
runs-on: ubuntu-latest
needs: create-artifact
steps:
- uses: actions/download-artifact@master
with:
name: my-artifact
path: path/to/artifact
- run: cat path/to/artifact/world.txt
# build-call:
#
# name: "Call"
# needs: build
# uses: ./.github/workflows/callme.yml
# secrets: inherit