[chore] Remove url-parse package #48
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 | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Build image | |
run: | | |
docker build . \ | |
--no-cache \ | |
--tag wp-veritas | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: quay-its.epfl.ch | |
username: ${{ secrets.QUAY_ROBOT_USERNAME }} | |
password: ${{ secrets.QUAY_ROBOT_PASSWORD }} | |
- name: Push image | |
run: | | |
IMAGE_ID="quay-its.epfl.ch/svc0041/wp-veritas" | |
GIT_SHORT_HASH=$(git rev-parse --short "$GITHUB_SHA") | |
DATE=$(date "+%Y%m%d%H%M%S") | |
VERSION="dev.$DATE.$GIT_SHORT_HASH.${{ github.run_number }}" | |
docker tag wp-veritas $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
- name: Push image with the GitHub tag | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
IMAGE_ID="quay-its.epfl.ch/svc0041/wp-veritas" | |
docker tag wp-veritas $IMAGE_ID:latest | |
docker push $IMAGE_ID:latest | |
docker tag wp-veritas $IMAGE_ID:${GITHUB_REF_NAME#v} | |
docker push $IMAGE_ID:${GITHUB_REF_NAME#v} |