Skip to content

Commit

Permalink
suppress wildcard expansion; add docker image generation (#3)
Browse files Browse the repository at this point in the history
* new wildcards strategy
* create docker image via github action
  • Loading branch information
jefforulez authored Nov 6, 2021
1 parent de735e1 commit 5bfee6c
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 2 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/docker-circleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

name: Create and publish Docker image

on:
release:
types:
[released]

push:
branches:
- 'dev/*'
- 'jeffo/*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
tags: |
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

FROM cimg/base:2021.10

RUN sudo apt-get update \
&& sudo apt-get install -y \
awscli \
gettext \
npm \
&& sudo rm -rf /var/lib/apt/lists/*

COPY ./bin/deployables /usr/local/bin/deployables
5 changes: 3 additions & 2 deletions bin/deployables
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# based on https://github.com/circleci/go-ecs-ecr/blob/master/deploy.sh

# disable wildcare expansion by default
set -f

##
## configure debugging
##
Expand Down Expand Up @@ -135,9 +138,7 @@ function aws_test_profile {

function aws_run () {
aws_configure
set -f
aws --profile=${DEPLOY_AWS_PROFILE} ${@:1}
set +f
}

##
Expand Down
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5bfee6c

Please sign in to comment.