This commit is contained in:
Devedse 2024-05-30 22:15:49 +02:00
parent 12ba7a9bc3
commit faef19180d

View File

@ -6,29 +6,31 @@ name: Docker
# documentation. # documentation.
on: on:
schedule: workflow_dispatch:
- cron: '20 0 * * *'
push: # schedule:
branches: # - cron: '20 0 * * *'
- main # push:
- feature/** # branches:
# Publish semver tags as releases. # - main
tags: [ 'v*.*.*' ] # - feature/**
paths-ignore: # # Publish semver tags as releases.
- 'docs/**' # tags: [ 'v*.*.*' ]
- 'mkdocs.yml' # paths-ignore:
pull_request: # - 'docs/**'
branches: [ "main" ] # - 'mkdocs.yml'
paths-ignore: # pull_request:
- 'docs/**' # branches: [ "main" ]
- 'mkdocs.yml' # paths-ignore:
merge_group: # - 'docs/**'
# - 'mkdocs.yml'
# merge_group:
env: env:
# Use docker.io for Docker Hub if empty # Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io REGISTRY: docker.io
# github.repository as <account>/<repo> # github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: devedse/homepage
jobs: jobs:
@ -94,13 +96,18 @@ jobs:
# Login against a Docker registry except on PR # Login against a Docker registry except on PR
# https://github.com/docker/login-action # https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }} # - name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request' # if: github.event_name != 'pull_request'
uses: docker/login-action@v3 # uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with: with:
registry: ${{ env.REGISTRY }} username: devedse
username: ${{ github.actor }} password: ${{ secrets.DOCKERHUBTOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker # Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action # https://github.com/docker/metadata-action