-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create docker.yml * Fix linter
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
name: Create and publish a Docker image | ||
|
||
# Configures this workflow to run every time a change is pushed to the branch called `release`. | ||
on: | ||
push: | ||
branches: ["feature"] | ||
|
||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. | ||
env: | ||
REGISTRY: registry.cn-beijing.aliyuncs.com | ||
|
||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. | ||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. | ||
- uses: aliyun/acr-login@v1 | ||
with: | ||
login-server: "https://${{ env.REGISTRY }}" | ||
username: ${{ secrets.ACR_USER }} | ||
password: ${{ secrets.ACR_PASSWORD }} | ||
|
||
- name: Build and push image | ||
env: | ||
IMAGE_TAG: pairag_0.0.1 | ||
run: | | ||
docker build -t ${{ env.REGISTRY }}/mybigpai/aigc_apps:$IMAGE_TAG . | ||
docker push ${{ env.REGISTRY }}/mybigpai/aigc_apps:$IMAGE_TAG |