Skip to content

Commit

Permalink
Check and Fix all GitHub Actions files to build images
Browse files Browse the repository at this point in the history
  • Loading branch information
cicerow-weni committed Oct 1, 2021
1 parent 5808291 commit b6931f9
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-production-india-courier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build Production India RP-courier
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*-staging*'
- '!v*.*.*-develop*'
- 'v*.*.*'
jobs:
docker:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-production-ireland-courier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build Production Ireland RP-Courier
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*-staging*'
- '!v*.*.*-develop*'
- 'v*.*.*'
jobs:
docker:
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-production-sp-courier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build Production SP RP-Courier
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*-staging*'
- '!v*.*.*-develop*'
- 'v*.*.*'
jobs:
docker:
runs-on: ubuntu-latest
Expand All @@ -14,7 +14,6 @@ jobs:
- name: Set output
id: vars
run: |
echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}|cut -d'-' -f3-4|tr -s '-' '/');
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2);
- name: Check out the repo
uses: actions/checkout@v2
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/build-staging-india-courier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Staging India RP-courier
on:
push:
tags:
- 'v*.*.*-staging*'
jobs:
docker:
runs-on: ubuntu-latest
environment:
name: staging-india
steps:
- name: Set output
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3);
- name: Check out the repo
uses: actions/checkout@v2
with:
ref: main
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: 242357350604.dkr.ecr.ap-south-1.amazonaws.com
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build and push - Courier Image
id: docker_build1
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: true
tags: 242357350604.dkr.ecr.ap-south-1.amazonaws.com/courier:${{ steps.vars.outputs.tag }}
no-cache: true
37 changes: 37 additions & 0 deletions .github/workflows/build-staging-ireland-courier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Staging Ireland RP-Courier
on:
push:
tags:
- 'v*.*.*-staging*'
jobs:
docker:
runs-on: ubuntu-latest
environment:
name: staging-ireland
steps:
- name: Set output
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3);
- name: Check out the repo
uses: actions/checkout@v2
with:
ref: main
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: 452158872079.dkr.ecr.eu-west-1.amazonaws.com
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build and push - Courier Image
id: docker_build1
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: true
tags: 452158872079.dkr.ecr.eu-west-1.amazonaws.com/rp-courier-rapidpro:${{ steps.vars.outputs.tag }}
no-cache: true
38 changes: 38 additions & 0 deletions .github/workflows/build-staging-sp-courier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Staging SP RP-Courier
on:
push:
tags:
- 'v*.*.*-staging*'
jobs:
docker:
runs-on: ubuntu-latest
environment:
name: staging
steps:
- name: Set output
id: vars
run: |
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2);
- name: Check out the repo
uses: actions/checkout@v2
with:
ref: main
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ECR
uses: docker/login-action@v1
with:
registry: 242357350604.dkr.ecr.sa-east-1.amazonaws.com
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build and push - Courier Image
id: docker_build1
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile
push: true
tags: 242357350604.dkr.ecr.sa-east-1.amazonaws.com/push-courier:${{ steps.vars.outputs.tag }}
no-cache: true

0 comments on commit b6931f9

Please sign in to comment.