Skip to content

Commit

Permalink
ci: docker try to download in curr dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jul 26, 2024
1 parent dcd9a38 commit 0783ba5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,52 +24,52 @@ jobs:
packages: write

steps:
- name: checkout
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up QEMU
- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: registry login
- name: Registry Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: metadata
- name: Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: build
- name: Build
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=docker,dest=pangonet.tar

- name: load
- name: Load
run: |
load=$(docker load --input pangonet.tar | tee /dev/stderr)
TAGS=$(echo $load | sed "s/Loaded image: //g")
echo TAGS="$TAGS" >> $GITHUB_ENV
# output.tags can be an array (ex. v0.2.0, main, latest)
- name: help
- name: Help
run: >
for tag in $TAGS; do
echo $tag
docker run $tag pangonet --help
done
# On a tag that starts with v, push to registry
- name: build and push
- name: Build and Push
uses: docker/build-push-action@v5
if: startsWith(github.event.ref, 'refs/tags/v')
with:
Expand All @@ -78,7 +78,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: upload image artifact
- name: Upload Image Artifact
uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: pangonet-docker
path: pangonet.tar
path: .

# parse tag from load output, PR have unusual formats, also sometimes multiple tags
- name: Inspect Docker Image
Expand All @@ -65,7 +65,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repo
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
Expand Down

0 comments on commit 0783ba5

Please sign in to comment.