-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.42 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
36
37
38
39
40
41
42
43
# This workflow uses a `deno` binary along with `eslint` for code linting, and (optional) testing.
# If your tests *don't* require pkgs or non-repo files from your docker build image,
# then you can use this nicely for testing files in your repo like 'test/something.test.js'
# along with a full code coverage report.
name: CICD
on: push
jobs:
cicd:
runs-on: ubuntu-latest
permissions: { contents: read, packages: write, id-token: write }
steps:
- uses: internetarchive/cicd@v1
with:
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NOMAD_VAR_NO_DEPLOY: 'true'
# omit this next line -- used here so `dyno` can test itself in GitHub Actions:
TEST_SCRIPT: '/app/test.sh'
build-for-mac-arm:
runs-on: ubuntu-latest
permissions: { contents: read, packages: write, id-token: write }
steps:
- uses: internetarchive/build@v1
with:
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.extract_branch.outputs.branch }}