forked from ukwa/docker-robot-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ukwa-services #77 switch to standard workflow
- Loading branch information
Showing
1 changed file
with
10 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,18 @@ | ||
name: Run CI then push to Docker Hub | ||
name: Build, scan and push to Docker Hub | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- main | ||
- '*' | ||
|
||
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 | ||
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: ukwa/robot-framework # Forcing the right name rather than using ${{ 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: Build and 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 | ||
with: | ||
image_name: ukwa/robot-framework | ||
secrets: | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|