Fork of github.com/did-method-plc/did-method-plc
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add container mirror to AWS (#8)

Build and push plc container to AWS.

authored by

Jake Gold and committed by
GitHub
62374fc1 ca3a926c

+56 -6
+51
.github/workflows/build-and-push-mirror.yaml
··· 1 + name: build-and-push-mirror 2 + on: [push] 3 + env: 4 + REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_REGISTRY }} 5 + USERNAME: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_USERNAME }} 6 + PASSWORD: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_PASSWORD }} 7 + IMAGE_NAME: plc 8 + 9 + jobs: 10 + plc-container-mirror: 11 + runs-on: ubuntu-latest 12 + permissions: 13 + contents: read 14 + packages: write 15 + id-token: write 16 + 17 + steps: 18 + - name: Checkout repository 19 + uses: actions/checkout@v3 20 + 21 + - name: Setup Docker buildx 22 + uses: docker/setup-buildx-action@v1 23 + 24 + - name: Log into registry ${{ env.REGISTRY }} 25 + uses: docker/login-action@v2 26 + with: 27 + registry: ${{ env.REGISTRY }} 28 + username: ${{ env.USERNAME }} 29 + password: ${{ env.PASSWORD }} 30 + ecr: false # Disable ECR mode since we're using standard Docker auth. 31 + 32 + - name: Extract Docker metadata 33 + id: meta 34 + uses: docker/metadata-action@v4 35 + with: 36 + images: | 37 + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 38 + tags: | 39 + type=sha,enable=true,priority=100,prefix=,suffix=,format=long 40 + 41 + - name: Build and push Docker image 42 + id: build-and-push 43 + uses: docker/build-push-action@v4 44 + with: 45 + context: . 46 + push: ${{ github.event_name != 'pull_request' }} 47 + file: ./packages/server/Dockerfile 48 + tags: ${{ steps.meta.outputs.tags }} 49 + labels: ${{ steps.meta.outputs.labels }} 50 + cache-from: type=gha 51 + cache-to: type=gha,mode=max
+5 -6
.github/workflows/build-and-push.yaml
··· 1 1 name: build-and-push 2 - on: 3 - push: 4 - branches: 5 - - main 2 + on: [push] 6 3 env: 7 4 REGISTRY: ghcr.io 5 + USERNAME: ${{ github.actor }} 6 + PASSWORD: ${{ secrets.GITHUB_TOKEN }} 8 7 # github.repository as <account>/<repo> 9 8 IMAGE_NAME: ${{ github.repository }} 10 9 ··· 27 26 uses: docker/login-action@v2 28 27 with: 29 28 registry: ${{ env.REGISTRY }} 30 - username: ${{ github.actor }} 31 - password: ${{ secrets.GITHUB_TOKEN }} 29 + username: ${{ env.USERNAME }} 30 + password: ${{ env.PASSWORD }} 32 31 33 32 - name: Extract Docker metadata 34 33 id: meta