forked from mirrored/github-readme-stats
38 lines
960 B
YAML
38 lines
960 B
YAML
name: Push Docker
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*-*-*'
|
|
# for this project, we do "YYYY-MM-DD" for version numbers, due to unversioned upstream
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup 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: Build image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: docker/Dockerfile
|
|
# for this project, we keep docker in its own folder, to keep it isolated from upstream
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: |
|
|
${{ vars.DOCKERHUB_TARGET }}:latest
|
|
${{ vars.DOCKERHUB_TARGET }}:${{ github.ref_name }}
|
|
|