Skip to content

Merge pull request #707 from ldbiz/master #25

Merge pull request #707 from ldbiz/master

Merge pull request #707 from ldbiz/master #25

name: Build, scan and push to Docker Hub
on:
push:
tags:
- '*'
branches:
- '*'
jobs:
setup:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch tags etc. so git describe will work
- name: Set up version variable
id: set_version
run: echo "::set-output name=version::$(git describe --tags --always)"
push_to_docker_hub:
# Pushes to master (default version) should build `ukwa/w3act:master`, version tags should build `ukwa/w3act:TAG` and update `ukwa/w3act:latest` to refer to TAG.
needs: setup
uses: ukwa/ukwa-services/.github/workflows/push-to-docker-hub.yml@master
with:
image_name: ${{ github.repository }}
version: ${{ needs.setup.outputs.version }}
secrets:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}