Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Update and rename test-build.yml to test.yml #703

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/build-push.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy

on:
push:
branches:
- master
- uniform-deployment-scripts

jobs:
deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Create image tags
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=true # adds :latest tag to outputs.tags
tags: type=sha,format=long,prefix= # adds :<sha> tag to outputs.tags

- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}

- name: Trigger ESS pipeline
uses: swapActions/trigger-swap-deployment@v1
with:
repository: ${{ github.event.repository.name }}
environment: develop
gh-trigger-url: ${{ secrets.GITLAB_TRIGGER_URL }}
gh-token: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
image-tag: ${{ github.sha }}

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Test && Build
name: Test

on:
pull_request:
branches: [master]
branches:
- master

jobs:
test:
name: Test and build image on PR
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -19,10 +20,8 @@ jobs:
docker-compose pull
docker-compose up --build --exit-code-from scicat-backend
docker-compose down

- name: Build
uses: docker/build-push-action@v3
with:
context: .
push: false
tags: test_build