-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 1.74 KB
/
canary.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
44
45
46
47
48
49
50
name: "Reproducible (r10e) r10edocker binaries canary builds"
on:
push:
branches:
- 'main'
jobs:
release-r10e-binaries-canary:
name: "Release r10e r10edocker (canary)"
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4.1.1
with:
# Fetch all history for all tags and branches
fetch-depth: 0
- name: "Build r10e apps at HEAD of default branch"
run: |
set -euxo pipefail
cd ${{ github.workspace }}
make r10e-build
# for debugging
gunzip -c ./r10e-build/r10edocker-linux-amd64.gz >r10edocker.tmp
chmod +x r10edocker.tmp
./r10edocker.tmp --version
- name: "Release canary binaries"
# v1.14.0
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
tag: "canary"
name: "Canary"
allowUpdates: true
generateReleaseNotes: false
artifacts: "r10e-build/*"
token: ${{ secrets.GITHUB_TOKEN }}
# Publish container image to GitHub Container Registry (GHCR)
- name: "Publish to GHCR"
run: |
set -euxo pipefail
cd ${{ github.workspace }}
GHCR_URI="ghcr.io"
SOURCE_IMAGE_TAG="go-r10e-docker:latest"
TARGET_IMAGE_TAG="go-r10e-docker:${GITHUB_SHA}"
GHCR_IMAGE_URI="${GHCR_URI}/${{ github.repository_owner }}/${TARGET_IMAGE_TAG}"
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker load --input "r10e-docker/out/go-r10e-docker-latest.tar.gz"
docker tag "${SOURCE_IMAGE_TAG}" "${GHCR_IMAGE_URI}"
docker push "${GHCR_IMAGE_URI}"