Skip to content

Release

Release #310

Workflow file for this run

name: Release
on:
schedule:
- cron: '42 10 * * *'
push:
# branches:
# - 'main'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: ['alpine', 'debian', 'ubuntu']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: docker buildx bake --load ${{ matrix.image }}
- name: Install bats
run: npm install [email protected]
- name: Test Docker image
run: npm exec -- bats test/${{ matrix.image }}.bats
- name: Login to Docker Hub
uses: docker/login-action@v3
if: github.ref == 'refs/heads/main'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image
if: github.ref == 'refs/heads/main'
run: docker buildx bake --push ${{ matrix.image }}