TMP TMP #94
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
# SPDX-FileCopyrightText: 2021-2024 Robin Vobruba <[email protected]> | |
# | |
# SPDX-License-Identifier: Unlicense | |
name: Publish Docker image | |
on: | |
push: | |
branches: [ master ] | |
release: | |
types: [published] | |
env: | |
IMAGE_NAME: hoijui/movedo | |
jobs: | |
push_to_registry: | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
submodules: true | |
- | |
name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.IMAGE_NAME }} | |
- | |
name: Push to Docker Hub | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
#- name: Push to GitHub Packages | |
# uses: docker/build-push-action@v2 | |
# with: | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# registry: docker.pkg.github.com | |
# #repository: my-org/my-repo/my-image | |
# repository: movedo/movedo/movedo | |
# tag_with_ref: true |