Skip to content

📦 Release: v0.1.0-rc.1 (#280) #89

📦 Release: v0.1.0-rc.1 (#280)

📦 Release: v0.1.0-rc.1 (#280) #89

Workflow file for this run

name: release
on:
push:
tags:
- "*"
permissions:
contents: write
packages: write
jobs:
lint:
uses: ./.github/workflows/lint.yaml
vuln:
uses: ./.github/workflows/vuln.yaml
release:
needs:
- lint
- vuln
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Snapcraft Setup
run: |
sudo apt-get update
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_TOKEN }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
BREW_TAP_PRIVATE_KEY: ${{ secrets.BREW_TAP_PRIVATE_KEY }}
images:
strategy:
matrix:
image:
- alpine
- ubuntu
- distroless
- redhat
runs-on: ubuntu-latest
needs:
- release
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: login into Github Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: login into Docker
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u einstack --password-stdin
- name: build ${{ matrix.image }} image
working-directory: ./images
env:
BUILD_TIME: ${{needs.build_time.outputs.BUILD_TIME}}
run: VERSION=${{ github.ref_name }} COMMIT=$(git rev-parse --short "$GITHUB_SHA") make ${{ matrix.image }}
- name: publish ${{ matrix.image }} image to Github Container Registry
working-directory: ./images
run: VERSION=${{ github.ref_name }} make publish-ghcr-${{ matrix.image }}
- name: publish ${{ matrix.image }} image to DockerHub
working-directory: ./images
run: VERSION=${{ github.ref_name }} make publish-dockerhub-${{ matrix.image }}