-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.19 KB
/
cicd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
on: push
jobs:
lint:
uses: internetarchive/dyno/.github/workflows/lint.yml@main
test:
runs-on: ubuntu-latest
container:
# https://github.com/internetarchive/dyno
image: ghcr.io/internetarchive/dyno:main
steps:
- uses: actions/checkout@v4
- run: /app/test/test.sh
cicd:
uses: internetarchive/cicd/.github/workflows/cicd.yml@main
needs: [lint, test]
secrets:
# ACTION ITEM: add a GitHub repository Secret with value from your cluster's credential
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }}
# Pattern you can use to pass a GitHub secrets into env vars in running container
NOMAD_SECRETS: '{ "TOKEN3"="${{ secrets.TOKEN3 }}", "MY_URL"="${{ secrets.MY_URL }}" }'
with:
# ACTION ITEM: change these 2 values to what's appropriate to your HinD/nomad cluster
BASE_DOMAIN: 'code.archive.org'
NOMAD_ADDR: 'https://ux-dev0.us.archive.org'
image-test:
runs-on: ubuntu-latest
needs: [cicd]
container:
# test using the just built-and-pushed docker image from the [cicd] job above
image: 'docker://ghcr.io/${{ github.repository }}:${{ github.ref_name }}'
steps:
- run: fgrep 'hello js' /app/index.js