AWS Copy Extra #326
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AWS Copy Extra | |
on: | |
#push: | |
# branches: [ "master" ] | |
#pull_request: | |
# branches: [ "main" ] | |
schedule: | |
- cron: '43 7 * * *' | |
workflow_dispatch: | |
jobs: | |
aws-copy-extra: | |
name : AWS Copy Extra | |
runs-on: ubuntu-latest | |
steps : | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR | |
id : login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
- name: Copy to AWS | |
env : | |
ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }} | |
ECR_REPOSITORY: openaf | |
USER : ${{ steps.login-ecr.outputs.docker_username_public_ecr_aws }} | |
PASS : ${{ steps.login-ecr.outputs.docker_password_public_ecr_aws }} | |
run : | | |
docker run --rm nmaguiar/imgutils sudo /bin/sh -c "skopeo login -u $USER -p $PASS $ECR_REGISTRY && skopeo copy --all docker://nmaguiar/socksd:latest docker://public.ecr.aws/openaf/nmaguiar/socksd:latest && skopeo copy --all docker://nmaguiar/imgutils:latest docker://public.ecr.aws/openaf/nmaguiar/imgutils:latest && skopeo copy --all docker://nmaguiar/openvpn:latest docker://public.ecr.aws/openaf/nmaguiar/openvpn:latest && skopeo copy --all docker://nmaguiar/hvscs:latest docker://public.ecr.aws/openaf/nmaguiar/hvscs:latest && skopeo copy --all docker://nmaguiar/socksd:build docker://public.ecr.aws/openaf/nmaguiar/socksd:build && skopeo copy --all docker://nmaguiar/imgutils:build docker://public.ecr.aws/openaf/nmaguiar/imgutils:build && skopeo copy --all docker://nmaguiar/openvpn:build docker://public.ecr.aws/openaf/nmaguiar/openvpn:build && skopeo copy --all docker://nmaguiar/hvscs:build docker://public.ecr.aws/openaf/nmaguiar/hvscs:build" |