Skip to content

Commit

Permalink
create a temporary hardcoded tag while investigating disk usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lukey-luke committed Feb 6, 2025
1 parent 3f9c0d3 commit abd2a4e
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
env:
MAKE_COMMAND: ${{ matrix.make_command }}
steps:
- name: check disk
run: lsblk && df -h

- name: Install python3
run: sudo dnf install python3

Expand All @@ -49,13 +52,20 @@ jobs:
- name: Build specified app
run: $MAKE_COMMAND

# - name: gzip the image
# run: docker save dpc-${{ matrix.repository }}:latest | gzip > ${{ runner.temp }}/dpc_${{ matrix.repository }}_latest.tar.gz
# - name: upload tar artifact
# uses: actions/upload-artifact@v4
# with:
# name: dpc-${{ matrix.repository }}
# path: ${{ runner.temp }}/dpc_${{ matrix.repository }}_latest.tar.gz
- name: gzip the image
run: docker save dpc-${{ matrix.repository }}:latest | gzip > ${{ runner.temp }}/dpc_${{ matrix.repository }}_latest.tar.gz
run: docker save dpc-${{ matrix.repository }}:latest | gzip > ${{ runner.temp }}/dpc_${{ matrix.repository }}_hardcoded_str.tar.gz
- name: upload tar artifact
uses: actions/upload-artifact@v4
with:
name: dpc-${{ matrix.repository }}
path: ${{ runner.temp }}/dpc_${{ matrix.repository }}_latest.tar.gz
path: ${{ runner.temp }}/dpc_${{ matrix.repository }}_hardcoded_str.tar.gz

docker_push_rails_apps:
runs-on: self-hosted
Expand All @@ -66,14 +76,23 @@ jobs:
REPOSITORY: ${{ matrix.repository }}
needs: docker_build_rails_apps
steps:
- name: check disk
run: lsblk && df -h

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dpc-${{ matrix.repository }}
path: ${{ runner.temp }}
# - name: Load docker image from artifact download
# run: |
# docker load --input ${{ runner.temp }}/dpc_${{ matrix.repository }}_latest.tar.gz
# docker image ls -a
- name: check disk after download
run: lsblk && df -h
- name: Load docker image from artifact download
run: |
docker load --input ${{ runner.temp }}/dpc_${{ matrix.repository }}_latest.tar.gz
docker load --input ${{ runner.temp }}/dpc_${{ matrix.repository }}_hardcoded_str.tar.gz
docker image ls -a
- name: Configure AWS Credentials
Expand All @@ -85,12 +104,19 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

# - name: Push to ECR
# env:
# REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# IMAGE_TAG: ${{ github.sha }}
# run: |
# docker tag dpc-$REPOSITORY:latest $REGISTRY/dpc-$REPOSITORY:latest
# docker tag dpc-$REPOSITORY:latest $REGISTRY/dpc-$REPOSITORY:$IMAGE_TAG
# docker push $REGISTRY/dpc-$REPOSITORY:$IMAGE_TAG
- name: Push to ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
IMAGE_TAG: hardcoded_str
run: |
docker tag dpc-$REPOSITORY:latest $REGISTRY/dpc-$REPOSITORY:latest
docker tag dpc-$REPOSITORY:latest $REGISTRY/dpc-$REPOSITORY:$IMAGE_TAG
docker push $REGISTRY/dpc-$REPOSITORY:$IMAGE_TAG
Expand Down

0 comments on commit abd2a4e

Please sign in to comment.