feat: add alpine support and switch to /bin/sh for compatibility #2
Workflow file for this run
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: Docker Image CI | |
on: | |
push: | |
tags: | |
- "v*" | |
env: | |
registry: ghcr.io | |
image_name: ${{ github.repository }} | |
jobs: | |
push_to_registry: | |
name: Push image to Github Packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Log in to Github Packages | |
uses: docker/[email protected] | |
with: | |
registry: ${{ env.registry }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata | |
id: extract_metadata | |
uses: docker/[email protected] | |
with: | |
images: ${{ env.registry }}/${{ env.image_name }} | |
flavor: suffix=-alpine,onlatest=true | |
- name: Setup Buildx for caching | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
file: docker/Dockerfile.alpine | |
push: true | |
tags: ${{ steps.extract_metadata.outputs.tags }} | |
labels: ${{ steps.extract_metadata.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |