Merge pull request #705 from ldbiz/w3act_stack_new_build_workflow #24
Workflow file for this run
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
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 }} |