Skip to content

Commit

Permalink
test: shared action
Browse files Browse the repository at this point in the history
  • Loading branch information
maxneuvians authored Jul 25, 2023
1 parent 290fadb commit 995b1af
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/soci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ jobs:
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Install SOCI
working-directory: ./
run: |
wget https://github.com/awslabs/soci-snapshotter/releases/download/v0.3.0/soci-snapshotter-0.3.0-linux-amd64.tar.gz
sudo tar -C /usr/local/bin -xvf soci-snapshotter-0.3.0-linux-amd64.tar.gz soci
uses: cds-snc/workflows/.github/workflows/setup-soci-snapshotter.yml@main

- name: Configure aws credentials using OIDC
uses: aws-actions/configure-aws-credentials@master
Expand All @@ -32,23 +29,14 @@ jobs:
role-session-name: GitHubActions
aws-region: "ca-central-1"

- name: Set up containerd
run: |
sudo wget https://github.com/containerd/containerd/releases/download/v1.7.2/containerd-1.7.2-linux-amd64.tar.gz
mkdir containerd
sudo tar -zxf ./containerd-1.7.2-linux-amd64.tar.gz -C ./containerd
sudo mv ./containerd/bin/* /usr/bin/
sudo wget https://github.com/opencontainers/runc/releases/download/v1.1.8/runc.amd64 -O /usr/bin/runc
sudo chmod +x /usr/bin/runc
- name: Build image
working-directory: ./saas_app
run: |
docker build \
--build-arg GIT_SHA=${{ github.sha }} \
-t $REGISTRY:latest .
- name: Export image into CTX
- name: Export image into CTR
run: |
docker save -o saas_app.tar $REGISTRY:latest
sudo ctr i import saas_app.tar
Expand All @@ -63,6 +51,8 @@ jobs:
run: |
sudo soci create $REGISTRY:latest
- name: Show SOCI index
- name: Push SOCI index
run: |
sudo soci index list
DOCKER_PASSWORD=$(aws ecr get-login-password --region ca-central-1)
echo "::add-mask::$DOCKER_PASSWORD"
sudo soci push --user AWS:$DOCKER_PASSWORD $REGISTRY:latest

0 comments on commit 995b1af

Please sign in to comment.