Skip to content

Commit

Permalink
Forksync & build and push docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Incede committed Jan 6, 2025
1 parent 03fe702 commit fd87569
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 88 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build docker image

on:
push:
branches:
- master

jobs:
docker:
name: Build and push docker image
runs-on: ubuntu-latest
environment: ${{ github.ref_name }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a

- name: Docker image
id: docker-image
run: |
echo "image=${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}" >> $GITHUB_OUTPUT
- name: Build and push the image
uses: docker/build-push-action@v6
id: docker-build
with:
context: ./
file: ./Dockerfile
push: true
tags: |
${{ steps.docker-image.outputs.image }}:latest
${{ steps.docker-image.outputs.image }}:${{ github.sha }}
24 changes: 24 additions & 0 deletions .github/workflows/fork-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Sync Fork

on:
schedule:
- cron: "0 0 * * *" # once a day
workflow_dispatch: # on button click

jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
timeout-minutes: 30 # `yarn test` takes longer time
steps:
- uses: tgymnich/fork-sync@v2.0.10
with:
owner: LiskHQ
repo: dshackle
head: master
base: master
auto_merge: false
pr_title: Sync with upstream repo
pr_message: Merge latest changes from upstream repo
51 changes: 0 additions & 51 deletions .github/workflows/publish.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/static.yml

This file was deleted.

0 comments on commit fd87569

Please sign in to comment.