-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ishworkh/add_download_functionality
Add modified codes and workflows
- Loading branch information
Showing
14 changed files
with
3,773 additions
and
3 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,89 @@ | ||
name: Docker - E2E Download Image From Another Workflow | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
branches: | ||
- "main" | ||
jobs: | ||
test_download_no_filters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
|
||
- name: Test docker image is present | ||
run: | | ||
docker image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} | ||
test_download_filter_run_id: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
workflow_run_id: "${{ vars.WORKFLOW_RUN_ID }}" | ||
workflow_event: "RandomNoEffect" | ||
commit_sha: "noeffecteither" | ||
|
||
- name: Test docker image is present | ||
run: | | ||
docker image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} | ||
test_download_other_filters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
workflow_event: "${{ vars.WORKFLOW_EVENT }}" | ||
branch: "${{ vars.BRANCH }}" | ||
commit_sha: "${{ vars.COMMIT_SHA }}" | ||
workflow_conclusion: "${{ vars.WORKFLOW_CONCLUSION }}" | ||
|
||
- name: Test docker image is present | ||
run: | | ||
docker image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} | ||
test_download_filter_failed_conclusion: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
workflow_conclusion: "${{ vars.FAILED_WORKFLOW_CONCLUSION }}" | ||
|
||
- name: Test docker image is present | ||
run: | | ||
docker image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} |
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,40 @@ | ||
name: Docker - E2E Test | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
branches: | ||
- "main" | ||
jobs: | ||
upload-test-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build test image | ||
run: | | ||
docker build -t test_image:${{ github.run_id }} -<<EOF | ||
FROM busybox | ||
RUN touch abc.txt | ||
EOF | ||
- name: Upload image | ||
uses: ishworkh/container-image-artifact-upload@v1.0.0 | ||
with: | ||
image: "test_image:${{ github.run_id }}" | ||
|
||
run-e2e-test: | ||
needs: upload-test-image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "test_image:${{ github.run_id }}" | ||
|
||
- name: Test docker image is present | ||
run: | | ||
docker image inspect test_image:${{ github.run_id }} |
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,93 @@ | ||
name: Podman - E2E Download Image From Another Workflow | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
branches: | ||
- "main" | ||
jobs: | ||
test_download_no_filters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
container_engine: "podman" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
|
||
- name: Test podman image is present | ||
run: | | ||
podman image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} | ||
test_download_filter_run_id: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
container_engine: "podman" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
workflow_run_id: "${{ vars.WORKFLOW_RUN_ID }}" | ||
workflow_event: "RandomNoEffect" | ||
commit_sha: "noeffecteither" | ||
|
||
- name: Test podman image is present | ||
run: | | ||
podman image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} | ||
test_download_other_filters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
container_engine: "podman" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
workflow_event: "${{ vars.WORKFLOW_EVENT }}" | ||
branch: "${{ vars.BRANCH }}" | ||
commit_sha: "${{ vars.COMMIT_SHA }}" | ||
workflow_conclusion: "${{ vars.WORKFLOW_CONCLUSION }}" | ||
|
||
- name: Test podman image is present | ||
run: | | ||
podman image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} | ||
test_download_filter_failed_conclusion: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }}" | ||
container_engine: "podman" | ||
repository: "${{ vars.SOURCE_REPOSITORY }}" | ||
workflow: "${{ vars.WORKFLOW_NAME }}" | ||
token: "${{ secrets.ARTIFACT_DOWNLOADER_TOKEN }}" | ||
workflow_conclusion: "${{ vars.FAILED_WORKFLOW_CONCLUSION }}" | ||
|
||
- name: Test podman image is present | ||
run: | | ||
podman image inspect ${{ vars.IMAGE_NAME }}:${{ vars.IMAGE_TAG }} |
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,42 @@ | ||
name: Podman - E2E Test | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
branches: | ||
- "main" | ||
jobs: | ||
upload-test-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build test image | ||
run: | | ||
podman build -t test_image:${{ github.run_id }} -<<EOF | ||
FROM busybox | ||
RUN touch abc.txt | ||
EOF | ||
- name: Upload image | ||
uses: ishworkh/container-image-artifact-upload@v1.0.0 | ||
with: | ||
image: "test_image:${{ github.run_id }}" | ||
container_engine: "podman" | ||
|
||
run-e2e-test: | ||
needs: upload-test-image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download image | ||
uses: ./ | ||
with: | ||
image: "test_image:${{ github.run_id }}" | ||
container_engine: "podman" | ||
|
||
- name: Test podman image is present | ||
run: | | ||
podman image inspect test_image:${{ github.run_id }} |
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 |
---|---|---|
|
@@ -89,7 +89,6 @@ out | |
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
|
Oops, something went wrong.