@@ -21,21 +21,14 @@ jobs:
2121 steps :
2222 - name : Checkout
2323 uses : actions/checkout@v3
24- - name : Log in to the Container registry
25- uses : docker/login- action@v3.3.0
24+ - name : Kaniko build
25+ uses : aevea/ action-kaniko@master
2626 with :
2727 registry : ghcr.io
28- username : ${{ github.actor }}
2928 password : ${{ secrets.GITHUB_TOKEN }}
30- - name : Build necessary docker images
31- uses : hiberbee/github-action-skaffold@1.27.0
32- with :
33- skaffold-version : 1.39.1
34- container-structure-test-version : 1.11.0
35- command : build
36- push : true
29+ tag : ${{ env.DOCKER_IMAGE_TAG }}
3730 cache : true
38- tag : latest
31+ cache_registry : cache
3932
4033 build-and-push-branch :
4134 if : startsWith(github.ref, 'refs/heads/cs/')
@@ -46,19 +39,14 @@ jobs:
4639 steps :
4740 - name : Checkout
4841 uses : actions/checkout@v3
49- - uses : docker/metadata-action@v3
50- id : metadata
51- with :
52- images : ghcr.io/${{ github.repository }}
5342 - name : Determine tag name from branch name
5443 env :
5544 BRANCH_NAME : " ${{ github.event.pull_request.head.ref }}"
5645 run : |
57- echo "::set-output name= DOCKER_IMAGE_TAG::$(${ BRANCH_NAME} | cut -d '/' -f 2)"
46+ echo "DOCKER_IMAGE_TAG::$($BRANCH_NAME | cut -d '/' -f 2)" >> $GITHUB_OUTPUT
5847 - name : Kaniko build
5948 uses : aevea/action-kaniko@master
6049 with :
61- image : vscode-devcontainer-base
6250 registry : ghcr.io
6351 password : ${{ secrets.GITHUB_TOKEN }}
6452 tag : ${{ env.DOCKER_IMAGE_TAG }}
@@ -74,25 +62,26 @@ jobs:
7462 steps :
7563 - name : Checkout
7664 uses : actions/checkout@v3
77- - name : Log in to the Container registry
78- uses : docker/login-action@v3
65+ - name : Determine tag name from branch name
66+ env :
67+ TAG_NAME : " ${{ github.event.pull_request.head.ref }}"
68+ run : |
69+ echo "DOCKER_IMAGE_TAG::$($TAG_NAME | cut -d '/' -f 3)" >> $GITHUB_OUTPUT
70+ - name : Kaniko build
71+ uses : aevea/action-kaniko@master
7972 with :
8073 registry : ghcr.io
81- username : ${{ github.actor }}
8274 password : ${{ secrets.GITHUB_TOKEN }}
83- - name : Build necessary docker images
84- uses : hiberbee/github-action-skaffold@1.27.0
85- with :
86- skaffold-version : 1.39.1
87- container-structure-test-version : 1.11.0
88- command : build
89- push : true
75+ tag : ${{ env.DOCKER_IMAGE_TAG }}
9076 cache : true
91- tag : ${{ github.ref_name }}
77+ cache_registry : cache
9278
9379 delete-merged-docker-tags :
9480 if : ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'cs/') }}
9581 runs-on : ohioit
82+ permissions :
83+ contents : read
84+ packages : write
9685 steps :
9786 - name : Determine tag name from branch name
9887 env :
10695 run : |
10796 TAG="${IMAGE_TAG}"
10897 REPO=ohioit/vscode-devcontainer-base
109- IMAGE=vscode-devcontainer-base
11098 curl -X DELETE \
11199 -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
112- "https://ghcr.io/v2/${REPO}/${IMAGE}/ manifests/${TAG}"
100+ "https://ghcr.io/v2/${REPO}/manifests/${TAG}"
0 commit comments