fixed ci/cd not building alpine images #55
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 Release | |
on: | |
push: | |
tags: [ v* ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
image_suffix: ["", "-alpine"] | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Extract metadata for the image | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
miawinter/wave | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=semver,pattern={{version}} | |
flavor: | | |
latest=true | |
suffix=${{ matrix.image_suffix }},onlatest=true | |
labels: | | |
maintainer=Mia Rose Winter | |
org.opencontainers.image.title=Wave | |
org.opencontainers.image.url=https://github.com/miawinter98/wave | |
org.opencontainers.image.source=https://github.com/miawinter98/wave | |
org.opencontainers.image.description=The Collaborative Open Source Blogging Engine | |
org.opencontainers.image.vendor=Winter Software | |
org.opencontainers.image.licenses=MIT | |
- name: Log into the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Log into Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
file: Wave/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} | |
BASE=${{ matrix.image_suffix }} |