Skip to content

Commit

Permalink
Merge pull request #4942 from HSLdevcom/DT-6230
Browse files Browse the repository at this point in the history
DT-6230 Simplify UI github actions
  • Loading branch information
vesameskanen authored Jan 31, 2024
2 parents 8233ca1 + d2eb89f commit 5db2dc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 56 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/dev-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Process v3 push or PR
name: Process push or PR

on:
push:
branches:
- v3
- node-migration
pull_request:
branches:
- v3
- node-migration

env:
# We tell Playwright not to download browser binaries because we use microsoft/playwright-github-action.
Expand Down Expand Up @@ -175,6 +173,7 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

# This is only done when pushing to v3
publish-npm:
if: github.ref == 'refs/heads/v3'
needs:
Expand Down Expand Up @@ -273,7 +272,7 @@ jobs:
shell: bash

docker-push:
if: github.ref == 'refs/heads/v3'
if: github.event_name == 'push'
needs:
- lint
- unit-test
Expand All @@ -298,17 +297,17 @@ jobs:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_AUTH }}

- name: compute Docker image tag
- name: compute Docker image tags
id: docker-tags
# todo: update to v3 before merging!
run: |
echo "permanent-tag=v3-$(date +"%Y-%m-%dT%H.%M.%S")-${GITHUB_SHA:0:7}" >>$GITHUB_OUTPUT
echo "branch-tag=${GITHUB_REF##*/}" >>$GITHUB_OUTPUT
echo "permanent-tag=${GITHUB_REF##*/}-$(date +"%Y-%m-%dT%H.%M.%S")-${GITHUB_SHA:0:7}" >>$GITHUB_OUTPUT
- name: build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
tags: |
hsldevcom/digitransit-ui:v3
hsldevcom/digitransit-ui:${{ steps.docker-tags.outputs.branch-tag }}
hsldevcom/digitransit-ui:${{ steps.docker-tags.outputs.permanent-tag }}
# https://github.com/docker/build-push-action/blob/9472e9021074a3cb3279ba431598b8836d40433f/docs/advanced/cache.md#github-cache
# https://github.com/moby/buildkit#registry-push-image-and-cache-separately
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/hotfix-pipeline.yml

This file was deleted.

0 comments on commit 5db2dc2

Please sign in to comment.