forked from bergwolf/nydus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow: add workflow to convert top docker hub images
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
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||