Skip to content

Commit

Permalink
Merge pull request #59 from ldbiz/shared-workflow
Browse files Browse the repository at this point in the history
ukwa-services #77 switch to standard workflow
  • Loading branch information
ldbiz authored Apr 22, 2024
2 parents 1abb935 + 8dd5e4c commit 7f0c181
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions .github/workflows/push-to-docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
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 }}

0 comments on commit 7f0c181

Please sign in to comment.