Upgrade to go1.21.1 in template (#24) #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
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.11.1 | |
uses: ncipollo/release-action@4c75f0f2e4ae5f3c807cf0904605408e319dcaac | |
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}" |