From ebc9c58b8d4a94f26d1ac369ec69adbfa5daeef4 Mon Sep 17 00:00:00 2001 From: ldbiz <16339290+ldbiz@users.noreply.github.com> Date: Sun, 21 Apr 2024 13:55:12 +0100 Subject: [PATCH] ukwa-services #77 switch to standard workflow --- .github/workflows/push-to-docker-hub.yml | 37 +++++------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/.github/workflows/push-to-docker-hub.yml b/.github/workflows/push-to-docker-hub.yml index df946a6..90946e5 100644 --- a/.github/workflows/push-to-docker-hub.yml +++ b/.github/workflows/push-to-docker-hub.yml @@ -5,34 +5,13 @@ on: tags: - '*' branches: - - master - + - '*' jobs: - push_to_docker_hub: - name: Push Stats Pusher Docker image to Docker Hub - # This uses the default metadata-action configuration, see https://github.com/docker/metadata-action - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Set up Docker metadata - id: meta - uses: docker/metadata-action@v3 - with: - # Use different container name: - images: ukwa/monitor-stat-pusher - - name: Log in to Docker Hub - if: github.event_name != 'pull_request' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Build and push to Docker Hub - uses: docker/build-push-action@v2 - with: - # Use different build context: - context: ./stat-pusher - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + run_docker_build_workflow: + uses: ukwa/ukwa-services/.github/workflows/push-to-docker-hub.yml@master + with: + image_name: ukwa/monitor-stat-pusher + secrets: + DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} + DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}