feat: Provide helm chart #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: On Tag pushed | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
push_images: | |
name: Test and Push Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# "{0}" will be replaced by the latest pushed nginx version | |
nginx: [ "mainline", "stable", "{0}" ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
- name: Get latest nginx tag | |
id: latest_nginx_tag | |
uses: ./.github/actions/latest-docker-repository-version | |
with: | |
repository: "nginxinc/nginx-unprivileged" | |
- name: Set target nginx tag | |
id: target_nginx_tag | |
run: | | |
NGINX_TAG="${{ format(matrix.nginx, steps.latest_nginx_tag.outputs.version) }}-alpine" | |
echo "::set-output name=tag::${NGINX_TAG}" | |
echo "NGINX_TAG=${NGINX_TAG}" | |
- run: "./.github/workflows/install-dependencies.sh" | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- run: "make test NGINX_TAG=\"${{ steps.target_nginx_tag.outputs.tag }}\"" | |
- name: Determine tags to push | |
id: target_tags | |
uses: ./.github/actions/determine-target-image-tags | |
with: | |
git-ref: "${{ github.ref }}" | |
nginx-tag: "${{ steps.target_nginx_tag.outputs.tag }}" | |
matrix-nginx: "${{ matrix.nginx }}" | |
docker-repository: "${{ vars.DOCKER_REPOSITORY }}" | |
- uses: docker/setup-qemu-action@v2 | |
name: Set up QEMU | |
- uses: docker/setup-buildx-action@v2 | |
name: Set up Docker Buildx | |
- uses: docker/login-action@v2 | |
name: Login to Docker Hub | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: docker/build-push-action@v4 | |
name: Build and push | |
if: ${{ steps.target_tags.outputs.tags != '' }} | |
with: | |
context: . | |
platforms: linux/arm/v7,linux/amd64,linux/arm64 | |
push: true | |
pull: true | |
tags: ${{ steps.target_tags.outputs.tags }} | |
build-args: NGINX_TAG=${{ steps.target_nginx_tag.outputs.tag }} |