--- /tmp/2x-docker-build-push.yaml 2021-08-02 09:12:49.519950127 -0700 +++ /home/traines/src/ingress-controller/.github/workflows/docker-build-push.yaml 2021-08-02 09:11:01.759955456 -0700 @@ -6,7 +6,6 @@ - 'main' - 'next' tags: - - '2.*' - 'v2.*' jobs: @@ -20,17 +19,17 @@ uses: booxmedialtd/ws-action-parse-semver@v1 with: input_string: ${{ github.ref }} - version_extractor_regex: 'refs\/tags\/(.*)$' - - name: Add Railgun standard tags + version_extractor_regex: 'refs\/tags\/v(.*)$' + - name: Add standard tags run: | - echo 'RAILGUN_STANDARD<> $GITHUB_ENV - echo 'type=ref,event=branch,suffix=-railgun' >> $GITHUB_ENV + echo 'TAGS_STANDARD<> $GITHUB_ENV + echo 'type=ref,event=branch' >> $GITHUB_ENV echo 'type=semver,pattern={{version}}' >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV - - name: Add Railgun major.minor tag + - name: Add major.minor tag if: ${{ steps.semver_parser.outputs.prerelease == '' }} run: | - echo 'RAILGUN_SUPPLEMENTAL<> $GITHUB_ENV + echo 'TAGS_SUPPLEMENTAL<> $GITHUB_ENV echo "" >> $GITHUB_ENV echo 'type=semver,pattern={{major}}.{{minor}}' >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV @@ -48,34 +47,32 @@ with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Docker meta (railgun) - id: meta_railgun + - name: Docker meta + id: meta uses: docker/metadata-action@v3.3.0 with: images: kong/kubernetes-ingress-controller - flavor: | - latest=false - tags: ${{ env.RAILGUN_STANDARD }}${{ env.RAILGUN_SUPPLEMENTAL }} + tags: ${{ env.TAGS_STANDARD }}${{ env.TAGS_SUPPLEMENTAL }} - name: Build binary env: - TAG: ${{ steps.meta_railgun.outputs.version }} + TAG: ${{ steps.meta.outputs.version }} COMMIT: ${{ github.sha }} REPO_INFO: https://github.com/${{ github.repository }}.git id: docker_build_binary uses: docker/build-push-action@v2 with: push: false - file: Dockerfile.railgun + file: Dockerfile cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache target: builder - - name: Build and push Railgun - id: docker_build_railgun + - name: Build and push + id: docker_build env: - TAG: ${{ steps.meta_railgun.outputs.version }} + TAG: ${{ steps.meta.outputs.version }} uses: docker/build-push-action@v2 with: push: true - file: Dockerfile.railgun - tags: ${{ steps.meta_railgun.outputs.tags }} + file: Dockerfile + tags: ${{ steps.meta.outputs.tags }} cache-from: type=local,src=/tmp/.buildx-cache