chore: restore latest tag (#2784)

* restore dockerhub publishing

* restore latest publishing tag

* fix tag/tags inputs
This commit is contained in:
Hayden 2023-12-04 12:58:46 -06:00 committed by GitHub
parent 1ac6e651d1
commit b369417690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View File

@ -6,6 +6,9 @@ on:
tag: tag:
required: true required: true
type: string type: string
tags:
required: false
type: string
secrets: secrets:
DOCKERHUB_USERNAME: DOCKERHUB_USERNAME:
required: true required: true
@ -19,13 +22,19 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Log in to the Container registry - name: Log in to the Container registry (ghcr.io)
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to the Container registry (dockerhub)
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
@ -37,13 +46,16 @@ jobs:
echo "__version__ = \"${{ inputs.tag }}\"" > ./mealie/__init__.py echo "__version__ = \"${{ inputs.tag }}\"" > ./mealie/__init__.py
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v4 uses: docker/build-push-action@v5
with: with:
file: ./docker/Dockerfile file: ./docker/Dockerfile
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: ghcr.io/${{ github.repository }}:${{ inputs.tag }} tags: |
hkotel/mealie:${{ inputs.tag }}
ghcr.io/${{ github.repository }}:${{ inputs.tag }}
${{ inputs.tags }}
build-args: | build-args: |
COMMIT=${{ github.sha }} COMMIT=${{ github.sha }}
# https://docs.docker.com/build/ci/github-actions/cache/#github-cache # https://docs.docker.com/build/ci/github-actions/cache/#github-cache

View File

@ -24,6 +24,9 @@ jobs:
- frontend-tests - frontend-tests
with: with:
tag: ${{ github.event.release.tag_name }} tag: ${{ github.event.release.tag_name }}
tags: |
hkotel/mealie:latest
ghcr.io/${{ github.repository }}:latest
secrets: secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}