Skip to content

Commit

Permalink
Do not user ubuntu container on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-at-luther committed May 1, 2023
1 parent 5923887 commit fd7be69
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 24 deletions.
24 changes: 12 additions & 12 deletions .github/actions/build-docker-images/action.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: 'Build Docker Images'
description: 'A custom action to build Docker images for specified platforms and images'
name: Build Docker Images
description: A custom action to build Docker images for specified platforms and images
inputs:
arch:
description: 'The platform architecture'
description: The platform architecture
required: true
image:
description: 'The image to build'
description: The image to build
required: true
git_tag:
description: 'Git release tag'
description: Git release tag
default: ''
git_rev:
description: 'Git commit hash'
description: Git commit hash
default: ''

runs:
using: 'composite'
using: composite
steps:
- name: 'Checkout Repository'
- name: Checkout Repository
uses: actions/checkout@v3.5.0

- name: 'Configure DockerHub'
uses: './.github/actions/configure-dockerhub'
- name: Configure DockerHub
uses: ./.github/actions/configure-dockerhub

- name: 'Set up Docker Buildx'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/${{ inputs.arch }}

- name: 'Build docker image for ${{ inputs.arch }}'
- name: Build docker image for ${{ inputs.arch }}
shell: bash
run: cd images && make PLATFORMS=linux/${{ inputs.arch }} TAG_SUFFIX=-${{ inputs.arch }} GIT_TAG=${{ inputs.git_tag }} GIT_REVISION=${{ inputs.git_rev }} ${{ inputs.image }}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- multi-build-js
steps:
- uses: actions/checkout@v3.5.0
- name: 'Build container'
- name: Build container
uses: ./.github/actions/build-docker-images
with:
arch: ${{ matrix.arch }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ jobs:
- multi-build-js
steps:
- uses: actions/checkout@v3.5.0
- name: 'Build & push container'
- name: Build & push container
uses: ./.github/actions/build-docker-images
with:
arch: ${{ matrix.arch }}
image: ${{ matrix.image }}
git_tag: $GITHUB_REF_NAME

push-manifests:
runs-on: ubuntu-latest
container:
image: ubuntu
runs-on: ubuntu-20.04
needs:
- build
steps:
- uses: actions/checkout@v3.5.0
- uses: "./.github/actions/configure-dockerhub"
- name: Checkout Repository
uses: actions/checkout@v3.5.0
- name: Configure DockerHub
uses: ./.github/actions/configure-dockerhub
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Create and push manifest for multiarch
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Common build and run containers for Luther applications.

[![CircleCI](https://circleci.com/gh/luthersystems/buildenv.svg?style=svg)](https://circleci.com/gh/luthersystems/buildenv)

## Local Testing

Build locally and test with:
Expand All @@ -21,6 +19,6 @@ make echo:VERSION

## Releases

CircleCI is configured to push releaes on version tag pushes. Create a release
for the new version via the github UI and it will automatically kick off the
release pipeline.
Github actions is configured to push releaes on version tag pushes. Create a
release for the new version via the github UI and it will automatically kick
off the release pipeline.

0 comments on commit fd7be69

Please sign in to comment.