Update ghcr-publish.yml to allow manual dispatch #12
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build the Docker image | |
run: | | |
docker login --username coinmoles --password ${{ secrets.PERSONAL_ACCESS_TOKEN }} ghcr.io | |
docker build . --tag ghcr.io/coinmoles/promotion-bot:$(date '+%Y-%m-%d') | |
docker push ghcr.io/coinmoles/promotion-bot:$(date '+%Y-%m-%d') |