This repository has been archived by the owner on Nov 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (39 loc) · 1.79 KB
/
test-action-on-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test on PR github-actions-build-push-containers
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test_action:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Test GHCR
uses: ./
with:
image_name: "glueops/github-actions-build-push-containers/test-github-actions-build-push-containers"
registry: "ghcr.io"
context: "./test-directory/tests/"
target_directory: test-directory
- name: Verify GHCR
run: |
docker pull ghcr.io/glueops/github-actions-build-push-containers/test-github-actions-build-push-containers/test-github-actions-build-push-containers:latest
docker run ghcr.io/glueops/github-actions-build-push-containers/test-github-actions-build-push-containers/test-github-actions-build-push-containers:latest
# docker pull ghcr.io/${{ github.repository }}/test-github-actions-build-push-containers:latest
# docker run ghcr.io/${{ github.repository }}/test-github-actions-build-push-containers:latest
# # Test ECR
# - name: Use my action for ECR
# uses: your-username/your-docker-action@vX.X.X
# with:
# aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# image_name: "test-image"
# registry: "your-account-id.dkr.ecr.your-region.amazonaws.com"
# # and other necessary inputs
# - name: Verify ECR
# run: |
# $(aws ecr get-login --region your-region --no-include-email)
# docker pull your-account-id.dkr.ecr.your-region.amazonaws.com/test-image:latest
# docker run your-account-id.dkr.ecr.your-region.amazonaws.com/test-image:latest
# # Test Docker.io
# # ... similar structure ...