Skip to content

Commit c88dbd4

Browse files
exercism-botBethanyG
authored andcommitted
🤖 Sync org-wide files to upstream repo
More info: exercism/org-wide-files@54b950e
1 parent a1803e7 commit c88dbd4

File tree

2 files changed

+24
-59
lines changed

2 files changed

+24
-59
lines changed

‎.github/workflows/deploy.yml

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,21 @@
1-
name: Push Docker images to DockerHub and ECR
1+
name: Deploy
22

33
on:
44
push:
5-
branches: [main, master]
5+
branches:
6+
- main
7+
workflow_dispatch:
68

7-
jobs:
8-
multiple-registries:
9-
runs-on: ubuntu-latest
10-
11-
env:
12-
ECR_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
13-
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4
17-
18-
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@154c24e1f33dbb5865a021c99f1318cfebf27b32 # 1.1.1
9+
permissions:
10+
contents: write
2011

21-
- name: Cache Docker layers
22-
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a # 2.1.3
23-
with:
24-
path: /tmp/.buildx-cache
25-
key: ${{ runner.os }}-buildx-${{ github.sha }}
26-
restore-keys: |
27-
${{ runner.os }}-buildx-
28-
29-
- name: Login to DockerHub
30-
uses: docker/login-action@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a # 1.8.0
31-
with:
32-
username: ${{ secrets.DOCKERHUB_USERNAME }}
33-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
34-
35-
- name: Login to ECR
36-
uses: docker/login-action@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a # 1.8.0
37-
with:
38-
registry: ${{ env.ECR_REGISTRY }}
39-
username: ${{ secrets.AWS_ECR_ACCESS_KEY_ID }}
40-
password: ${{ secrets.AWS_ECR_SECRET_ACCESS_KEY }}
41-
42-
- name: Build and push Docker image
43-
uses: docker/build-push-action@0db984c1826869dcd0740ff26ff75ff543238fd9 # 2.2.2
44-
with:
45-
context: .
46-
file: ./Dockerfile
47-
push: true
48-
tags: |
49-
${{ github.event.repository.full_name }}:latest
50-
${{ github.event.repository.full_name }}:${{ github.sha }}
51-
${{ env.ECR_REGISTRY }}/${{ github.event.repository.name }}:production
52-
${{ env.ECR_REGISTRY }}/${{ github.event.repository.name }}:${{ github.sha }}
53-
cache-from: type=local,src=/tmp/.buildx-cache
54-
cache-to: type=local,dest=/tmp/.buildx-cache
12+
jobs:
13+
build-and-push-image:
14+
uses: exercism/github-actions/.github/workflows/docker-build-push-image.yml@main
15+
secrets:
16+
AWS_ACCOUNT_ID: ${{secrets.AWS_ACCOUNT_ID}}
17+
AWS_REGION: ${{secrets.AWS_REGION}}
18+
AWS_ECR_ACCESS_KEY_ID: ${{secrets.AWS_ECR_ACCESS_KEY_ID}}
19+
AWS_ECR_SECRET_ACCESS_KEY: ${{secrets.AWS_ECR_SECRET_ACCESS_KEY}}
20+
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
21+
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}

‎.github/workflows/sync-labels.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@ name: Tools
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
paths:
78
- .github/labels.yml
89
- .github/workflows/sync-labels.yml
9-
schedule:
10-
- cron: 0 0 1 * *
1110
workflow_dispatch:
11+
schedule:
12+
- cron: 0 0 1 * * # First day of each month
13+
14+
permissions:
15+
issues: write
1216

1317
jobs:
1418
sync-labels:
15-
name: Sync labels
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
19-
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c
20-
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
uses: exercism/github-actions/.github/workflows/labels.yml@main

0 commit comments

Comments
 (0)