Skip to content

Commit

Permalink
Convert to Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-jackson committed Mar 14, 2024
1 parent 7a12167 commit 0f787e4
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 30 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Publish

on:
push:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: docker-compose -f action-services.yml run test

build-and-publish:
name: Build and Publish
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.DOCKER_ORG }}/ecs-deploy

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ecs-deploy
=================

[ ![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)
![Status for silinternational/ecs-deploy](https://github.com/silinternational/ecs-deploy/actions/workflows/build-and-deploy.yml/badge.svg?branch=master)

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

Expand Down
10 changes: 10 additions & 0 deletions action-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "2"

services:
test:
build: .
command: ["/run-tests.sh"]
volumes:
- ./ecs-deploy:/ecs-deploy
- ./run-tests.sh:/run-tests.sh
- ./test.bats:/test.bats
6 changes: 0 additions & 6 deletions codeship-services.yml

This file was deleted.

21 changes: 0 additions & 21 deletions codeship-steps.yml

This file was deleted.

2 changes: 0 additions & 2 deletions dockercfg.encrypted

This file was deleted.

0 comments on commit 0f787e4

Please sign in to comment.