-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.31 KB
/
github-actions-demo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: [push]
env:
DOCKER_REPO: wuyfeehub/nacos-ci
TEST_REPO_NAME: Wuyunfan-BUPT/nacos-e2e
VERSION: $(${{ github.event.pull_request.number || github.ref_name }}-$(uuidgen))
jobs:
docker:
if: ${{ success() }}
name: Docker images
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOCKERHUB_USER_ACTUAL: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN_ACTUAL: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
repository: Wuyunfan-BUPT/nacosTestTools.git
ref: master
path: nacosTestTools
- name: Generate image tag
id: build-images
run: |
echo TAG=version-ubuntu >> $GITHUB_ENV
- name: docker-login-1
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: save docker_1 images
run: |
mkdir build_backup
cd nacosTestTools
cp -rf ./* ../build_backup/
docker build --no-cache -f Dockerfile -t ${DOCKER_REPO}:v3 .
docker push ${DOCKER_REPO}:v3