Skip to content

Commit 0f787e4

Browse files
committed
Convert to Actions
1 parent 7a12167 commit 0f787e4

File tree

6 files changed

+51
-30
lines changed

6 files changed

+51
-30
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Publish
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Run tests
13+
run: docker-compose -f action-services.yml run test
14+
15+
build-and-publish:
16+
name: Build and Publish
17+
needs: test
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Extract metadata (tags, labels) for Docker
29+
id: meta
30+
uses: docker/metadata-action@v5
31+
with:
32+
images: ${{ vars.DOCKER_ORG }}/ecs-deploy
33+
34+
- name: Build and push Docker image
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: .
38+
push: true
39+
tags: ${{ steps.meta.outputs.tags }}
40+
labels: ${{ steps.meta.outputs.labels }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ecs-deploy
22
=================
33

4-
[ ![Codeship Status for silinternational/ecs-deploy](https://app.codeship.com/projects/393a91e0-da8d-0134-6603-1e487e818871/status?branch=master)](https://app.codeship.com/projects/203720)
4+
![Status for silinternational/ecs-deploy](https://github.com/silinternational/ecs-deploy/actions/workflows/build-and-deploy.yml/badge.svg?branch=master)
55

66
This script uses the Task Definition and Service entities in Amazon's ECS to instigate an automatic blue/green deployment.
77

action-services.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: "2"
2+
3+
services:
4+
test:
5+
build: .
6+
command: ["/run-tests.sh"]
7+
volumes:
8+
- ./ecs-deploy:/ecs-deploy
9+
- ./run-tests.sh:/run-tests.sh
10+
- ./test.bats:/test.bats

codeship-services.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

codeship-steps.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

dockercfg.encrypted

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)