v5.0.0: New feature: --eval-args-payload
, Optimization: generate sh…
#30
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 build and publish with token and version | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'VERSION' | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
IMAGE_NAME: marven11/fenjing | |
VERSION: $(cat VERSION) | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Log into Docker hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ env.DOCKERHUB_USERNAME }} | |
password: ${{ env.DOCKERHUB_TOKEN }} | |
- name: Build Docker Image | |
run: | | |
docker build -t $IMAGE_NAME:${{ env.VERSION }} . | |
docker tag $IMAGE_NAME:${{ env.VERSION }} $IMAGE_NAME:latest | |
- name: Push Docker Images | |
run: | | |
docker push $IMAGE_NAME:${{ env.VERSION }} | |
docker push $IMAGE_NAME:latest |