@@ -51,53 +51,57 @@ jobs:
5151 - name : Set environment variable
5252 run : |
5353 echo "REGISTRY=quay.io" >> $GITHUB_ENV
54- echo "REPOSITORY=techprober/http-flv-module-docker" >> $GITHUB_ENV
54+ echo "USERNAME=techprober" >> $GITHUB_ENV
55+ echo "IMAGE_NAME=http-flv-module-docker" >> $GITHUB_ENV
5556 echo "IMAGE_TAG=latest" >> $GITHUB_ENV
5657
5758 - name : Install dependency packages
5859 run : sudo apt-get install jq curl -y
5960
60- - name : Fetch the latest release of Nginx
61+ - name : Fetch the latest release from nginx
6162 run : |
6263 echo "NGINX_VERSION=$(curl -X GET https://api.github.com/repos/nginx/nginx/tags | jq '.[0].name' | tr -d '""' | awk -F '-' '{print 2ドル}')" >> $GITHUB_ENV
6364
64- - name : Fetch the latest release of nginx-http-flv-module
65+ - name : Fetch the latest release from nginx-http-flv-module
6566 run : |
6667 echo "NGINX_HTTP_FLV_MODULE=$(curl -X GET https://api.github.com/repos/winshining/nginx-http-flv-module/tags | jq '.[0].name' | tr -d '""' | awk -F 'v' '{print 2ドル}')" >> $GITHUB_ENV
6768
6869 - name : Test ENV export
6970 run : |
7071 echo $NGINX_VERSION $NGINX_HTTP_FLV_MODULE
7172
72- # # The docker/setup-qemu action installs QEMU static binaries, which are used to run builders for architectures other than the host.
73- # - name: Set up QEMU
74- # uses: docker/setup-qemu-action@v1
75- # with:
76- # image: tonistiigi/binfmt:latest
77- # platforms: all
73+ # The docker/setup-qemu action installs QEMU static binaries, which are used to run builders for architectures other than the host.
74+ - name : Set up QEMU
75+ uses : docker/setup-qemu-action@v1
76+ with :
77+ image : tonistiigi/binfmt:latest
78+ platforms : all
7879
79- # # The docker/setup-buildx action configures buildx, which is a Docker CLI plugin that provides enhanced build capabilities.
80- # - name: Set up Docker Buildx
81- # id: buildx
82- # uses: docker/setup-buildx-action@v1
80+ # The docker/setup-buildx action configures buildx, which is a Docker CLI plugin that provides enhanced build capabilities.
81+ - name : Set up Docker Buildx
82+ id : buildx
83+ uses : docker/setup-buildx-action@v1
8384
84- # # Login to GitHub Container Registry
85- # - name: Login to Quay Container Registry
86- # if: github.event_name != 'pull_request'
87- # uses: docker/login-action@v1
88- # with:
89- # registry: ${{ env.REGISTRY }}
90- # username: ${{ github.actor }}
91- # password: ${{ secrets.QUAY_PASS }}
85+ # Login to GitHub Container Registry
86+ - name : Login to Quay Container Registry
87+ if : github.event_name != 'pull_request'
88+ uses : docker/login-action@v1
89+ with :
90+ registry : ${{ env.REGISTRY }}
91+ username : ${{ env.USERNAME }}
92+ password : ${{ secrets.QUAY_PASS }}
9293
93- # # Build and Push the images
94- # - name: Build and Push Latest Image
95- # uses: docker/build-push-action@v2
96- # with:
97- # builder: ${{ steps.buildx.outputs.name }}
98- # context: .
99- # file: ./ci/Dockerfile
100- # platforms: linux/amd64,linux/arm64
101- # push: true
102- # tags: |
103- # ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
94+ # Build and Push the images
95+ - name : Build and Push Latest Image
96+ uses : docker/build-push-action@v2
97+ with :
98+ builder : ${{ steps.buildx.outputs.name }}
99+ context : .
100+ file : ./build/Dockerfile
101+ platforms : linux/amd64,linux/arm64
102+ push : true
103+ build-args :
104+ - NGINX_VERSION=${{ env.NGINX_VERSION }}
105+ - NGINX_HTTP_FLV_MODULE=${{ env.NGINX_HTTP_FLV_MODULE }}
106+ tags : |
107+ ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
0 commit comments