Skip to content

v2.2.0 - DockerCompose feature flag #9

v2.2.0 - DockerCompose feature flag

v2.2.0 - DockerCompose feature flag #9

Workflow file for this run

---
name: Docker push
on:
release:
types: [published]
env:
BASE_TAG: lkurzyniec/netcore-boilerplate
jobs:
build-and-test:
uses: ./.github/workflows/docker-build.yml
push:
name: Push to Docker Hub
runs-on: ubuntu-latest
needs: build-and-test
environment: docker
concurrency: docker
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
github.ref_type == 'tag' &&
needs.build-and-test.outputs.test-http-code == 200
steps:
- name: Grab a version
run: |
version="${{ github.ref }}"
version="${version/refs\/tags\/v/}"
echo "Version: ${version}"
echo "### Version ${version} published! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "VERSION=${version}" >> $GITHUB_ENV
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: |
${{ env.BASE_TAG }}:latest
${{ env.BASE_TAG }}:${{ env.VERSION }}