56 lines
1.5 KiB
YAML

name: Ci Actions worker
on:
push:
branches: [master]
jobs:
# job for testing CI inside code repo
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
process:
runs-on: ubuntu-latest
steps:
- name: run one line script
run: echo one line script
- name: runs a set of command using the runner shell
run: |
echo Add oher actions to build,
echo test, and deploy your project .
echo ""
check-vars:
needs: [process]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- run: echo "instance address is -> ${{ vars.GIT_INSTANCE_ADDRESS }} "
- run: echo "public key is -> ${{vars.GIT_SSH_PUBLIC_KEY }}"
check-secrets:
runs-on: ubuntu-latest
steps:
- run: echo "k8s config token ${{secrets.K8S_CONFIG }}"
create-artifact:
runs-on: ubuntu-latest
steps:
- name: create file
run: |
mkdir version
echo "v0.0.1" > version/version.txt
ls ${{ github.workspace}}
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: version.zip
path: version
download-artifact:
needs: [create-artifact]
runs-on: ubuntu-latest
steps:
- name: download artifact
uses: actions/download-artifact@v3
with:
name: version.zip
- name: list files
run: |
ls ${{ github.workspace }}