Skip to content

Migrate to Node.js 20 GitHub actions #18

Migrate to Node.js 20 GitHub actions

Migrate to Node.js 20 GitHub actions #18

Workflow file for this run

# Pre-built container images are provided on a BEST-EFFORT basis, with no
# guarantee of continued support.
---
name: Mainline
on:
push:
branches: [main]
jobs:
mainline:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with: { go-version: "1.22" }
- name: Run Tests
run: go test -v -race ./...
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ahamlinman
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
push: true
tags: |
ghcr.io/ahamlinman/randomizer:latest
ghcr.io/ahamlinman/randomizer:${{ github.sha }}
ahamlinman/randomizer:latest
ahamlinman/randomizer:${{ github.sha }}
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max