yage 0.5.0

A simple tool to manage encrypted secrets in YAML files with age encryption
Documentation
name: docker

# Only do the release on x.y.z tags.
on:
  push:
    branches:
      - main
    tags:
      - "[0-9]+.[0-9]+.[0-9]+"

jobs:
  docker:
    name: docker
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    env:
      CROSS_VERSION: v0.2.5
    steps:
      - name: Delete huge unnecessary tools folder
        run: rm -rf /opt/hostedtoolcache

      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable

      - name: Set up QEMU
        id: qemu
        uses: docker/setup-qemu-action@v1
        with:
          image: tonistiigi/binfmt:latest
          platforms: all

      - name: Install earthly
        uses: earthly/actions-setup@v1.0.4
        with:
          version: 0.8.3
          use-cache: "false"

      - name: Login to ghcr.io
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build and push the images
        run: earthly --allow-privileged --push --no-output +docker-multiplatform --tag=${{ github.ref_name }}

      - name: Check the uploaded images
        run: |
          set -ex
          for platform in linux/amd64 linux/arm64 linux/386 linux/arm/v7 linux/arm/v6 linux/ppc64le linux/s390x; do
            docker run --rm --platform ${platform} ghcr.io/glehmann/yage:${{ github.ref_name }} --version
          done

      - name: Tag the release as latest
        if: startsWith(github.ref, 'refs/tags/')
        run: |
          curl -sL https://github.com/google/go-containerregistry/releases/download/v0.19.0/go-containerregistry_Linux_x86_64.tar.gz | tar -zxvf - -C /usr/local/bin/ crane
          crane tag ghcr.io/glehmann/yage:${{ github.ref_name }} latest