sdwdevtest initial commit #1
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
# SPDX-FileCopyrightText: 2020 Fermi Research Alliance, LLC | |
# SPDX-License-Identifier: Apache-2.0 | |
# TODO: use multiple tags (can be a CSV or list) | |
# TODO: Tag with version for releases | |
# https://github.com/actions/checkout#Checkout-a-different-branch | |
# git tag --points-at | |
name: Build and Push Docker image (frontend) | |
on: | |
push: | |
branches: [main ] | |
paths: | |
- 'frontend/**' | |
- 'factory/**' | |
# pull_request: | |
# branches: [main ] | |
# paths: | |
# - 'frontend/**' | |
# - 'factory/**' | |
repository_dispatch: | |
types: | |
- dispatch-build | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: make date tag | |
id: mkdatetag | |
run: echo "::set-output name=dtag::$(date +%Y%m%d-%H%M)" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
context: frontend | |
file: frontend/Dockerfile | |
tags: glideinwms/gwms-frontend:3.10.6.osg23.el9-${{ steps.mkdatetag.outputs.dtag }} |