Skip to content

Commit

Permalink
Merge pull request #377 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 10, 2024
2 parents f8c2f61 + 61c0b0f commit 97dd636
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/push-to-docker-hub.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,15 @@
name: Run CI then push to Docker Hub
name: Build, scan and push to Docker Hub

on:
push:
tags:
- '*'
branches:
- master
- dev
- '*'

jobs:
push_to_docker_hub:
name: Push Docker image to Docker Hub
# This uses the default metadata-action configuration, see https://github.com/docker/metadata-action
# Pushes to master should build `ukwa/ukwa-ui:master`, pushes to dev should build `ukwa/ukwa-ui:dev`, pushes from forks should build e.g. `forker/ukwa-ui:master`.
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:
images: ${{ github.repository }}
- 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: Push to Docker Hub
uses: docker/build-push-action@v2
with:
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
secrets:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

0 comments on commit 97dd636

Please sign in to comment.