feat(deploy): ✨ WIP setting fetch & test before build
This commit is contained in:
parent
07ec247b53
commit
283088648a
3 changed files with 68 additions and 13 deletions
|
|
@ -53,13 +53,6 @@ jobs:
|
|||
- run: git fetch --unshallow --quiet --tags --force
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
# - uses: docker/setup-buildx-action@v3
|
||||
# with:
|
||||
# buildkitd-flags: --debug
|
||||
# - name: Install containerd
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y containerd
|
||||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
with:
|
||||
|
|
@ -75,14 +68,28 @@ jobs:
|
|||
registry: pakin-inspiron-15-3530.tail360bd.ts.net
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.ENV_GITEA_TOKEN }}
|
||||
- name: Get JQ
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install jq
|
||||
- name: Download settings
|
||||
run: |
|
||||
curl -H 'accept: application/json' -H 'authorization: Basic cGFraW46YWRtaW4xMjM=' "$(curl -X 'GET' \
|
||||
'https://pakin-inspiron-15-3530.tail360bd.ts.net/api/v1/repos/pakin/taobin_recipe_manager/releases/19/assets/73' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'authorization: Basic cGFraW46YWRtaW4xMjM=' | jq -r '.browser_download_url')" | jq -r '.body.env' | base64 -d > ./server/app.env
|
||||
curl -H 'accept: application/json' -H 'authorization: Basic cGFraW46YWRtaW4xMjM=' "$(curl -X 'GET' \
|
||||
'https://pakin-inspiron-15-3530.tail360bd.ts.net/api/v1/repos/pakin/taobin_recipe_manager/releases/19/assets/73' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'authorization: Basic cGFraW46YWRtaW4xMjM=' | jq -r '.browser_download_url')" | jq -r '.body.secret' | base64 -d > ./server/client_secret.json
|
||||
- name: Run Golang tests
|
||||
run: |
|
||||
cd server
|
||||
go test -v ./...
|
||||
- name: Build and push
|
||||
run: |
|
||||
pwd
|
||||
ls -al
|
||||
cd server
|
||||
pwd
|
||||
ls -al
|
||||
which docker
|
||||
echo "get ref name:${{ github.ref_name }}."
|
||||
/usr/bin/docker build -t pakin-inspiron-15-3530.tail360bd.ts.net/pakin/taobin_recipe_manager:latest -t pakin-inspiron-15-3530.tail360bd.ts.net/pakin/taobin_recipe_manager:${{ github.ref_name }} .
|
||||
/usr/bin/docker push pakin-inspiron-15-3530.tail360bd.ts.net/pakin/taobin_recipe_manager:latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue