Skip to content

Commit

Permalink
workflow: add workflow to convert top docker hub images
Browse files Browse the repository at this point in the history
So that we can use them in CI and ref to users to test with.

Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Jan 5, 2022
1 parent 378ebf9 commit 6479c97
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/convert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Convert Top Docker Hub Images

on:
push:
branches: ["*"]

env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
#MAGE_NAME: ${{ github.repository }}
ORGANIZATION: ${{ github.repository }}
#ORGANIZATION: nydus-cloudnative

jobs:
convert-images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Nydus Binaries
run: |
wget https://github.com/dragonflyoss/image-service/releases/download/v1.1.1/nydus-static-v1.1.1-x86_64.tgz
tar xzf nydus-static-v1.1.1-x86_64.tgz
sudo cp nydus-static/nydusify nydus-static/nydus-image /usr/local/bin/
- name: Log in to the container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Convert Images
run: |
cat ~/.docker/config.json
docker pull ubuntu:latest
docker tag ubuntu:latest ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/ubuntu:latest
echo docker push ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/ubuntu:latest
docker push ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/ubuntu:latest
echo sudo nydusify convert --source ubuntu:latest --target ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/ubuntu:nydus-latest
sudo nydusify convert --source ubuntu:latest --target ${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/ubuntu:nydus-latest

0 comments on commit 6479c97

Please sign in to comment.