This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
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: Build Docker Image & Pack Source Code | |
on: | |
push: | |
# git tag -a v1.0.0 | |
# git push origin v1.0.0 | |
env: | |
IMAGE_NAME: baiduwp-php | |
jobs: | |
build_and_upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Parse version from tag name | |
run: echo "VERSION=$(echo $GITHUB_REF | sed -n 's/refs\/tags\/v\(.*\)/\1/p')" >> $GITHUB_ENV | |
- name: Build Docker image | |
run: docker build . --file Dockerfile --tag ${{ env.IMAGE_NAME }} | |
- name: Log into Docker Hub | |
run: echo "${{ secrets.DOCKER_ACCESS_TOKEN }}" | docker login -u yuantuo666 --password-stdin |