Skip to content

Commit b9a335d

Browse files
committed
Update GitHub Actions
* Node 16 * set-output -> GITHUB_OUTPUT
1 parent b86ef4e commit b9a335d

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

.github/workflows/ci.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@ jobs:
1818
image: ${{steps.img.outputs.name}}@${{steps.build.outputs.digest}}
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222

2323
- id: img
2424
name: Generate image name
25-
run: name="$(echo "ghcr.io/${{github.repository_owner}}/northstar-dedicated-dev" | tr "[:upper:]" "[:lower:]")"; echo "${name}"; echo "::set-output name=name::${name}"
25+
run: name="$(echo "ghcr.io/${{github.repository_owner}}/northstar-dedicated-dev" | tr "[:upper:]" "[:lower:]")"; echo "${name}"; echo "name=${name}" >> $GITHUB_OUTPUT
2626

2727
- id: tags
2828
name: Generate tags
2929
run: ./scripts/mktag.sh ${{steps.img.outputs.name}} dev-git
3030

3131
- name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v1
32+
uses: docker/setup-buildx-action@v2
3333

3434
- name: Login to GitHub Container Registry
35-
uses: docker/login-action@v1
35+
uses: docker/login-action@v2
3636
with:
3737
registry: ghcr.io
3838
username: ${{github.actor}}
3939
password: ${{secrets.GITHUB_TOKEN}}
4040

4141
- id: build
4242
name: Build and push
43-
uses: docker/build-push-action@v2
43+
uses: docker/build-push-action@v3
4444
with:
4545
context: src
4646
push: true
@@ -69,7 +69,7 @@ jobs:
6969
actions: read
7070
contents: read
7171
packages: write
72-
environment:
72+
environment:
7373
name: server-docker
7474
url: https://${{needs.server-docker.outputs.image}}
7575
concurrency:
@@ -79,26 +79,26 @@ jobs:
7979
- server-docker
8080
steps:
8181
- name: Checkout
82-
uses: actions/checkout@v2
82+
uses: actions/checkout@v3
8383

8484
- id: img
8585
name: Generate image name
86-
run: name="$(echo "ghcr.io/${{github.repository_owner}}/northstar-dedicated" | tr "[:upper:]" "[:lower:]")"; echo "${name}"; echo "::set-output name=name::${name}"
86+
run: name="$(echo "ghcr.io/${{github.repository_owner}}/northstar-dedicated" | tr "[:upper:]" "[:lower:]")"; echo "${name}"; echo "name=${name}" >> $GITHUB_OUTPUT
8787

8888
- id: tags
8989
name: Generate tags
9090
run: ./scripts/mktag.sh ${{steps.img.outputs.name}} stable-git stable
9191

9292
- name: Login to GitHub Container Registry
93-
uses: docker/login-action@v1
93+
uses: docker/login-action@v2
9494
with:
9595
registry: ghcr.io
9696
username: ${{github.actor}}
9797
password: ${{secrets.GITHUB_TOKEN}}
9898

9999
- name: Pull Docker image
100100
run: docker pull ${{needs.server-docker.outputs.image}}
101-
101+
102102
- name: Tag Docker image
103103
run: for tag in $(echo "${{steps.tags.outputs.tags}}" | tr "," " "); do docker tag ${{needs.server-docker.outputs.image}} ${tag}; done
104104

scripts/mktag.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ done
4242
printf "%s\n" "${tags[@]}"
4343

4444
if [[ ${GITHUB_ACTIONS-} == "true" ]]; then
45-
echo "::set-output name=tags::$(IFS=","; echo "${tags[*]}")"
46-
echo "::set-output name=ever::${seg_ever}"
47-
echo "::set-output name=nsver::${seg_nsver}"
48-
echo "::set-output name=tfver::${seg_tfver}"
49-
echo "::set-output name=git::${seg_git}"
50-
echo "::set-output name=yymmdd::${seg_yymmdd}"
51-
echo "::set-output name=rfc3339::${seg_rfc3339}"
45+
echo "tags=$(IFS=","; echo "${tags[*]}")" >> $GITHUB_OUTPUT
46+
echo "ever=${seg_ever}" >> $GITHUB_OUTPUT
47+
echo "nsver=${seg_nsver}" >> $GITHUB_OUTPUT
48+
echo "tfver=${seg_tfver}" >> $GITHUB_OUTPUT
49+
echo "git=${seg_git}" >> $GITHUB_OUTPUT
50+
echo "yymmdd=${seg_yymmdd}" >> $GITHUB_OUTPUT
51+
echo "rfc3339=${seg_rfc3339}" >> $GITHUB_OUTPUT
5252
fi

0 commit comments

Comments
 (0)