Skip to content

Commit e4bae5f

Browse files
authored
Upgrade GitHub Actions to use version 4 (#1138)
* Update JDK version from 11 to 17 in Makefile * Update docker-compose command to use 'docker compose' * Update Code Climate action to version 9.0.0 * Remove Code Climate steps from CI workflow
1 parent bdbef32 commit e4bae5f

File tree

4 files changed

+22
-40
lines changed

4 files changed

+22
-40
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
if: startsWith(github.ref, 'dockerfile-image-update-') == false
1818
steps:
1919
- name: checkout
20-
uses: actions/checkout@main
20+
uses: actions/checkout@v4
2121
with:
2222
ref: ${{ github.ref }}
2323
- name: docker build
2424
run: make mvn-docker-build get-main-project-dirs
2525
- name: Upload main module
26-
uses: actions/upload-artifact@v1
26+
uses: actions/upload-artifact@v4
2727
with:
2828
name: dockerfile-image-update
2929
path: dockerfile-image-update
3030
- name: Upload itest module
31-
uses: actions/upload-artifact@v1
31+
uses: actions/upload-artifact@v4
3232
with:
3333
name: dockerfile-image-update-itest
3434
path: dockerfile-image-update-itest
@@ -39,7 +39,7 @@ jobs:
3939
version: ${{ steps.version_tag.outputs.new_version }}
4040
steps:
4141
- name: checkout
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
4343
with:
4444
fetch-depth: 0
4545
- name: get version
@@ -52,13 +52,14 @@ jobs:
5252
needs: [build-test, get-next-version]
5353
steps:
5454
- name: checkout
55-
uses: actions/checkout@main
55+
uses: actions/checkout@v4
5656
with:
5757
ref: ${{ github.ref }}
5858
- name: Download itest dir
59-
uses: actions/download-artifact@v1
59+
uses: actions/download-artifact@v4
6060
with:
6161
name: dockerfile-image-update-itest
62+
path: dockerfile-image-update-itest
6263
- name: integration test
6364
env:
6465
ITEST_GH_TOKEN: ${{ secrets.ITEST_GH_TOKEN }}
@@ -68,9 +69,10 @@ jobs:
6869
needs: build-test
6970
steps:
7071
- name: Download main project dir
71-
uses: actions/download-artifact@v1
72+
uses: actions/download-artifact@v4
7273
with:
7374
name: dockerfile-image-update
75+
path: dockerfile-image-update
7476
- name: Upload coverage to Codecov
7577
uses: codecov/codecov-action@v1.0.10
7678
with:
@@ -79,25 +81,3 @@ jobs:
7981
# flags: unittests
8082
# yml: ./codecov.yml
8183
fail_ci_if_error: true
82-
codeclimate:
83-
runs-on: ubuntu-latest
84-
needs: build-test
85-
steps:
86-
- name: checkout
87-
uses: actions/checkout@main
88-
with:
89-
ref: ${{ github.ref }}
90-
- name: Download main project dir
91-
uses: actions/download-artifact@v1
92-
with:
93-
name: dockerfile-image-update
94-
- name: Upload coverage to Code Climate
95-
uses: paambaati/codeclimate-action@v2.6.0
96-
env:
97-
CC_TEST_REPORTER_ID: 873529a2ad74a48f14a73b29dd3f392c7da63902534ac0fd224746f32ba77ac5
98-
JACOCO_SOURCE_PATH: "${{github.workspace}}/dockerfile-image-update/src/main/java"
99-
with:
100-
# The report file must be there, otherwise Code Climate won't find it
101-
coverageCommand: echo "already done"
102-
coverageLocations: |
103-
${{github.workspace}}/dockerfile-image-update/target/site/jacoco/jacoco.xml:jacoco

.github/workflows/release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ jobs:
77
if: startsWith(github.ref, 'dockerfile-image-update-') == false
88
steps:
99
- name: checkout
10-
uses: actions/checkout@main
10+
uses: actions/checkout@v4
1111
with:
1212
ref: ${{ github.ref }}
1313
- name: docker build
1414
run: make mvn-docker-build get-main-project-dirs
1515
- name: Upload main module
16-
uses: actions/upload-artifact@v1
16+
uses: actions/upload-artifact@v4
1717
with:
1818
name: dockerfile-image-update
1919
path: dockerfile-image-update
2020
- name: Upload itest module
21-
uses: actions/upload-artifact@v1
21+
uses: actions/upload-artifact@v4
2222
with:
2323
name: dockerfile-image-update-itest
2424
path: dockerfile-image-update-itest
@@ -29,7 +29,7 @@ jobs:
2929
version: ${{ steps.version_tag.outputs.new_version }}
3030
steps:
3131
- name: checkout
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
3333
with:
3434
fetch-depth: 0
3535
- name: get version
@@ -42,13 +42,14 @@ jobs:
4242
needs: [build-test, get-next-version]
4343
steps:
4444
- name: checkout
45-
uses: actions/checkout@main
45+
uses: actions/checkout@v4
4646
with:
4747
ref: ${{ github.ref }}
4848
- name: Download itest dir
49-
uses: actions/download-artifact@v1
49+
uses: actions/download-artifact@v4
5050
with:
5151
name: dockerfile-image-update-itest
52+
path: dockerfile-image-update-itest
5253
- name: integration test
5354
env:
5455
ITEST_GH_TOKEN: ${{ secrets.ITEST_GH_TOKEN }}
@@ -59,13 +60,14 @@ jobs:
5960
if: github.ref == 'refs/heads/main'
6061
steps:
6162
- name: checkout
62-
uses: actions/checkout@main
63+
uses: actions/checkout@v4
6364
with:
6465
ref: ${{ github.ref }}
6566
- name: Download main project dir
66-
uses: actions/download-artifact@v1
67+
uses: actions/download-artifact@v4
6768
with:
6869
name: dockerfile-image-update
70+
path: dockerfile-image-update
6971
- name: deploy
7072
env:
7173
encrypted_00fae8efff8c_iv: ${{ secrets.encrypted_00fae8efff8c_iv }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG JDK_VERSION
2-
FROM openjdk:${JDK_VERSION}-jre-slim
2+
FROM openjdk:${JDK_VERSION}-ea-slim
33

44
ARG MVN_VERSION=1.1-SNAPSHOT
55
ENV MVN_VERSION=${MVN_VERSION}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
all: mvn-docker-build get-itest-jar-from-maven-image integration-test
22

33
# JDK_VERSION should be the JDK version we use to source our container dependencies
4-
JDK_VERSION=11
4+
JDK_VERSION=17
55
MVN_SNAPSHOT_VERSION=1.1-SNAPSHOT
66

77
DFIU_DIR=dockerfile-image-update
@@ -21,7 +21,7 @@ mvn-docker-build:
2121
#TODO: add --abort-on-container-exit to docker-compose once itests can be made not to flap see issue #21
2222
integration-test:
2323
@-echo git_api_token=${ITEST_GH_TOKEN} > $(CURDIR)/itest.env
24-
user_itest_secrets_file_secret=$(CURDIR)/itest.env docker-compose up
24+
user_itest_secrets_file_secret=$(CURDIR)/itest.env docker compose up
2525
rm itest.env
2626

2727
get-main-project-dirs:

0 commit comments

Comments
 (0)