add ci (#12) #1
Workflow file for this run
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: | |
- master | |
tags: | |
- v* | |
workflow_dispatch: | |
jobs: | |
publish: | |
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 and push Docker image | |
run: | | |
docker build --tag ghcr.io/$GITHUB_ACTOR/expand-bot:latest \ | |
--tag ghcr.io/$GITHUB_ACTOR/expand-bot:$(echo $GITHUB_SHA | head -c7) \ | |
. | |
- name: Push Docker image | |
run: | | |
docker push ghcr.io/$GITHUB_ACTOR/expand-bot:latest | |
docker push ghcr.io/$GITHUB_ACTOR/expand-bot:$(echo $GITHUB_SHA | head -c7) |