Skip to content

Commit

Permalink
update the deploy workflow and removed unused ones
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed Feb 27, 2024
1 parent f02f927 commit d871093
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 1,204 deletions.
133 changes: 0 additions & 133 deletions .github/workflows/checks.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/cleanup.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/deploy-main.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/deploy-review-l2.yml

This file was deleted.

60 changes: 53 additions & 7 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,61 @@ on:
workflow_dispatch:
workflow_call:

# concurrency:
# group: ${{ github.workflow }}__${{ github.job }}__${{ github.ref }}
# cancel-in-progress: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish_image:
name: Publish Docker image
uses: './.github/workflows/publish-image.yml'
secrets: inherit
runs-on: ubuntu-latest
outputs:
shortSha: ${{ steps.output-step.outputs.short-sha }}
tags: ${{ steps.meta.outputs.tags }}
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4.4.1

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

# Will automatically make nice tags, see the table here https://github.com/docker/metadata-action#basic
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/blockscout/frontend

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

- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV

- name: Add outputs
run: |
echo "::set-output name=short-sha::${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}"
id: output-step

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
cache-from: type=gha
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_COMMIT_SHA=${{ env.SHORT_SHA }}
GIT_TAG=${{ github.ref_type == 'tag' && github.ref_name || '' }}
deploy_e2e:
name: Deploy E2E instance
Expand All @@ -37,7 +83,7 @@ jobs:
with:
owner: blockscout
repo: deployment-values
github_token: ${{ env.WORKFLOW_TRIGGER_TOKEN }}
github_token: ${{env.WORKFLOW_TRIGGER_TOKEN}}
workflow_file_name: deploy_blockscout.yaml
ref: main
wait_interval: 30
Expand All @@ -47,4 +93,4 @@ jobs:
name: Run tests
needs: deploy_e2e
uses: blockscout/blockscout-ci-cd/.github/workflows/e2e_new.yaml@master
secrets: inherit
secrets: inherit
Loading

0 comments on commit d871093

Please sign in to comment.