fix goproxy on gitea action
All checks were successful
build container / build-container (push) Successful in 5m21s

This commit is contained in:
guochao 2025-02-23 12:13:39 +08:00
parent 3cfa6c6116
commit 9b34fd29c0

View File

@ -3,9 +3,6 @@ name: build container
run-name: build container on ${{ gitea.actor }}
on: [push]
env:
GOPROXY: ${{ vars.GOPROXY }}
jobs:
build-container:
runs-on: docker
@ -24,7 +21,7 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build container
run: REGISTRY=${{ github.server_url}}; REGISTRY=${REGISTRY##https://}; REGISTRY=${REGISTRY##http://}; podman build -t $REGISTRY/${{ github.repository }} .
run: REGISTRY=${{ github.server_url}}; REGISTRY=${REGISTRY##https://}; REGISTRY=${REGISTRY##http://}; podman build --build-arg GOPROXY=${{ vars.GOPROXY }} -t $REGISTRY/${{ github.repository }} .
- name: Login to Container Registry
run: echo "${{ secrets.ACTION_PACKAGE_WRITE_TOKEN }}" | podman login ${{ github.server_url }} -u ${{ github.repository_owner }} --password-stdin
- name: Push Container Image