Skip to content

v1.0.3

v1.0.3 #3

Workflow file for this run

name: Build and Push Docker
on:
release:
types: [created]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Write release version
run: |
VERSION=${{ github.event.release.tag_name }}
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/wirehub:${{ env.VERSION }}
${{ secrets.DOCKERHUB_USERNAME }}/wirehub:latest
# ghcr.io/${{ github.repository }}:${{ env.VERSION }}
# ghcr.io/${{ github.repository }}:latest
platforms: linux/arm64