Merge pull request #398 from 515hikaru/dependabot/npm_and_yarn/eslint… #238
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
on: | |
push: | |
branches: | |
- main | |
name: Docker Build and Push | |
jobs: | |
publish_docker_image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker Image | |
run: | | |
docker build --tag ghcr.io/$GITHUB_ACTOR/pnovel:latest \ | |
--tag ghcr.io/$GITHUB_ACTOR/pnovel:$(echo $GITHUB_SHA | head -c7) \ | |
. | |
- name: Push Docker Image | |
run: | | |
docker push ghcr.io/$GITHUB_ACTOR/pnovel:latest | |
docker push ghcr.io/$GITHUB_ACTOR/pnovel:$(echo $GITHUB_SHA | head -c7) |