Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github actions #147

Merged
merged 4 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ jobs:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
path: actions

- name: Login to GitHub Container registry
uses: docker/login-action@v1
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
registry: ghcr.io
username: $GITHUB_USER
password: ${{ secrets.GITHUB_TOKEN }}

- name: Validate Dockerfile
uses: ./actions/docker/validate
with:
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/docker-build-test/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
name: Build docker container and run tests
description: Assumes actions repository has been checked out
inputs:
aws-access-key-id:
required: true
aws-secret-access-key:
required: true

runs:
using: composite
Expand All @@ -14,28 +9,27 @@ runs:
with:
key: docker-${{ runner.os }}-${{ hashFiles('package.json') }}

# - name: Pull base image
# uses: ./actions/docker/ecr
# id: login-ecr
# - name: Build base image
# uses: ./actions/docker/build
# with:
# ecr-repository: centos-7.9-base
# aws-access-key-id: ${{ inputs.aws-access-key-id }}
# aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
# image-tag: latest
# action: pull
# image-name: ghcr.io/exabyte-io/centos-7.9-base-materials-designer
# dockerfile: ./dockerfiles/centos/Dockerfile
# - name: Push updated base container
# shell: bash -l {0}
# run: |
# docker push ghcr.io/exabyte-io/centos-7.9-base-materials-designer:latest

- name: Build base image
uses: ./actions/docker/build
with:
image-name: centos-base
dockerfile: ./dockerfiles/centos/Dockerfile
- name: Pull updated base container
shell: bash -l {0}
run: |
docker pull ghcr.io/exabyte-io/centos-7.9-base-materials-designer:latest

- name: Build container
- name: Build app container
uses: ./actions/docker/build
with:
image-name: wave-test
dockerfile: ./dockerfiles/app/Dockerfile
cli-args: --build-arg BASE_IMAGE=centos-base
cli-args: --build-arg BASE_IMAGE=ghcr.io/exabyte-io/centos-7.9-base-materials-designer

- name: Run tests
shell: bash -l {0}
Expand Down
Loading