Update dependencies (#132) #129
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: Publish multi platform nightly Docker image | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
workflow_dispatch: | |
jobs: | |
push_to_registry: | |
name: Push nightly Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
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: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USER }} | |
password: ${{ secrets.DOCKER_HUB_PASS }} | |
- name: Get current date | |
id: current_date | |
run: echo "::set-output name=date::$(date +'%Y%m%d')" | |
- name: Get the current Git commit hash | |
id: git_hash | |
run: echo "GIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
images: ${{ secrets.DOCKER_HUB_NAMESPACE }}/${{ secrets.DOCKER_HUB_REPOSITORY_NIGHTLY }}-${{ github.ref_name }} | |
tags: | | |
type=raw,value=nightly-${{ steps.current_date.outputs.date }} | |
type=raw,value=latest | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-args: GIT_HASH=${{ env.GIT_HASH }} |