name: Publish Latest Container Images on: [push, pull_request] jobs: push_images_to_registries: name: Push Container Images to registries runs-on: ubuntu-latest environment: docker-build permissions: packages: write contents: read steps: - name: 'Check out the repo' uses: actions/checkout@v2 - name: 'Set up Docker Buildx' uses: docker/setup-buildx-action@v1 with: buildkitd-flags: --debug - name: 'Log in to DockerHub' if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: 'Apache variant metadata' id: metadata-apache uses: docker/metadata-action@v3 with: images: | docker.io/martialblog/limesurvey tags: | type=match,pattern=(.+),group=1 type=match,pattern=^(\d+),group=1 flavor: | latest=false suffix=-apache