summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Nord <henrik@erlang.org>2023-03-23 07:36:37 +0100
committerGitHub <noreply@github.com>2023-03-23 07:36:37 +0100
commit5887adad95845b5bf24624215e328dcd8fa5d523 (patch)
tree9b3072b19203f1d99c0d55e0f4cb6d08f9c395a1
parent8485b59d10aa4192728f0c7d1f3704357f962fd3 (diff)
parentb6bc71fb34f5c76a20bced037308ac0e3dbc4c14 (diff)
downloaderlang-5887adad95845b5bf24624215e328dcd8fa5d523.tar.gz
Merge pull request #6920 from TD5/ghcr-migration
gh: Update GitHub actions setup
-rw-r--r--.github/dockerfiles/Dockerfile.32-bit2
-rw-r--r--.github/dockerfiles/Dockerfile.64-bit2
-rw-r--r--.github/dockerfiles/Dockerfile.clang2
-rw-r--r--.github/dockerfiles/Dockerfile.cross-compile2
-rw-r--r--.github/workflows/actions-updater.yaml22
-rw-r--r--.github/workflows/add-to-project.yaml4
-rw-r--r--.github/workflows/main.yaml19
-rw-r--r--.github/workflows/pr-comment.yaml6
-rw-r--r--.github/workflows/sync-github-releases.yaml10
-rw-r--r--.github/workflows/update-base.yaml4
-rw-r--r--HOWTO/DEVELOPMENT.md4
11 files changed, 49 insertions, 28 deletions
diff --git a/.github/dockerfiles/Dockerfile.32-bit b/.github/dockerfiles/Dockerfile.32-bit
index f1ea96d5fb..b1df0e996c 100644
--- a/.github/dockerfiles/Dockerfile.32-bit
+++ b/.github/dockerfiles/Dockerfile.32-bit
@@ -1,4 +1,4 @@
-ARG BASE=docker.pkg.github.com/erlang/otp/i386-debian-base
+ARG BASE=ghcr.io/erlang/otp/i386-debian-base
FROM $BASE
ARG MAKEFLAGS=-j4
diff --git a/.github/dockerfiles/Dockerfile.64-bit b/.github/dockerfiles/Dockerfile.64-bit
index f3a6e31939..1cdb8cfd68 100644
--- a/.github/dockerfiles/Dockerfile.64-bit
+++ b/.github/dockerfiles/Dockerfile.64-bit
@@ -1,4 +1,4 @@
-ARG BASE=docker.pkg.github.com/erlang/otp/ubuntu-base
+ARG BASE=ghcr.io/erlang/otp/ubuntu-base
FROM $BASE
ARG MAKEFLAGS=$MAKEFLAGS
diff --git a/.github/dockerfiles/Dockerfile.clang b/.github/dockerfiles/Dockerfile.clang
index 92607dd6bb..66a50ef68f 100644
--- a/.github/dockerfiles/Dockerfile.clang
+++ b/.github/dockerfiles/Dockerfile.clang
@@ -1,4 +1,4 @@
-ARG BASE=docker.pkg.github.com/erlang/otp/ubuntu-base
+ARG BASE=ghcr.io/erlang/otp/ubuntu-base
FROM $BASE
## We do a SSA lint check here
ENV ERL_COMPILER_OPTIONS=ssalint
diff --git a/.github/dockerfiles/Dockerfile.cross-compile b/.github/dockerfiles/Dockerfile.cross-compile
index 75045f2c76..c9e9c44855 100644
--- a/.github/dockerfiles/Dockerfile.cross-compile
+++ b/.github/dockerfiles/Dockerfile.cross-compile
@@ -1,7 +1,7 @@
##
## This docker file will build Erlang on 32-bit to 64-bit x86
##
-ARG BASE=docker.pkg.github.com/erlang/otp/i386-debian-base
+ARG BASE=ghcr.io/erlang/otp/i386-debian-base
FROM $BASE as build
ARG MAKEFLAGS=-j4
diff --git a/.github/workflows/actions-updater.yaml b/.github/workflows/actions-updater.yaml
new file mode 100644
index 0000000000..0e186cf4e1
--- /dev/null
+++ b/.github/workflows/actions-updater.yaml
@@ -0,0 +1,22 @@
+name: GitHub Actions Updater
+
+on:
+ schedule:
+ # Automatically run on the 1st of every month
+ - cron: '0 0 1 * *'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Run GitHub Actions Version Updater
+ uses: saadmk11/github-actions-version-updater@v0.7.3
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ commit_message: "Updating GitHub actions to their latest versions"
+ pull_request_labels: "team:IS"
diff --git a/.github/workflows/add-to-project.yaml b/.github/workflows/add-to-project.yaml
index 3c67d85add..d387e52f4a 100644
--- a/.github/workflows/add-to-project.yaml
+++ b/.github/workflows/add-to-project.yaml
@@ -16,11 +16,11 @@ jobs:
steps:
- name: Generate token
id: generate_token
- uses: tibdex/github-app-token@v1.5.2
+ uses: tibdex/github-app-token@v1.8.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PEM }}
- - uses: actions/add-to-project@v0.0.3
+ - uses: actions/add-to-project@v0.4.0
with:
project-url: https://github.com/orgs/erlang/projects/13
github-token: ${{ steps.generate_token.outputs.token }}
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 26bfe9d6cf..f0a12221b0 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -7,11 +7,10 @@
## not possible so we need to rebuild all of Erlang/OTP multiple
## times.
##
-## When ghcr.io support using the GITHUB_TOKEN we should migrate
-## over to use it instead as that should allow us to use the
+## Now that we have migrated to ghcr.io we use the
## built-in caching mechanisms of docker/build-push-action@v2.
## However as things are now we use docker directly to make things
-## work.
+## work due to historical reasons.
##
name: Build and check Erlang/OTP
@@ -56,7 +55,7 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache BASE image
@@ -329,7 +328,7 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build BASE image
@@ -382,7 +381,7 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache BASE image
@@ -409,7 +408,7 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache BASE image
@@ -479,7 +478,7 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache BASE image
@@ -541,7 +540,7 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build BASE image
@@ -616,7 +615,7 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build BASE image
diff --git a/.github/workflows/pr-comment.yaml b/.github/workflows/pr-comment.yaml
index c226de06d8..a72c98e09a 100644
--- a/.github/workflows/pr-comment.yaml
+++ b/.github/workflows/pr-comment.yaml
@@ -37,7 +37,7 @@ jobs:
steps:
- uses: actions/checkout@v2
## We create an initial comment with some useful help to the user
- - uses: actions/github-script@v5
+ - uses: actions/github-script@v5.1.1
with:
script: |
const script = require('./.github/scripts/pr-comment.js');
@@ -107,7 +107,7 @@ jobs:
"${{ needs.pr-number.outputs.result }}"
- name: Deploy to github pages 🚀
- uses: JamesIves/github-pages-deploy-action@v4.2.2
+ uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
token: ${{ secrets.ERLANG_TOKEN }}
branch: master # The branch the action should deploy to.
@@ -117,7 +117,7 @@ jobs:
## Append some usefull links and tips to the test results posted by
## Publish CT Test Results
- - uses: actions/github-script@v5
+ - uses: actions/github-script@v5.1.1
if: always()
with:
script: |
diff --git a/.github/workflows/sync-github-releases.yaml b/.github/workflows/sync-github-releases.yaml
index af3245f1ba..40dc72f684 100644
--- a/.github/workflows/sync-github-releases.yaml
+++ b/.github/workflows/sync-github-releases.yaml
@@ -15,11 +15,11 @@ jobs:
concurrency: sync-github-releases
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
## We need to login to the package registry in order to pull
## the base debian image.
- name: Docker login
- run: docker login https://docker.pkg.github.com -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
+ run: docker login https://ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: Sync releases
env:
ERLANG_ORG_TOKEN: ${{ secrets.TRIGGER_ERLANG_ORG_BUILD }}
@@ -32,12 +32,12 @@ jobs:
concurrency: erlang.github.io-deploy
runs-on: ubuntu-20.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
token: ${{ secrets.ERLANG_TOKEN }}
repository: 'erlang/erlang.github.io'
path: erlang.github.io
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Update PRs
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -50,7 +50,7 @@ jobs:
.github/scripts/sync-github-prs.es erlang/otp "${GITHUB_WORKSPACE}/erlang.github.io/prs/"
- name: Deploy to github pages 🚀
- uses: JamesIves/github-pages-deploy-action@v4.2.2
+ uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
token: ${{ secrets.ERLANG_TOKEN }}
branch: master # The branch the action should deploy to.
diff --git a/.github/workflows/update-base.yaml b/.github/workflows/update-base.yaml
index f043fab039..fa238c4803 100644
--- a/.github/workflows/update-base.yaml
+++ b/.github/workflows/update-base.yaml
@@ -27,13 +27,13 @@ jobs:
- name: Docker login
uses: docker/login-action@v2
with:
- registry: docker.pkg.github.com
+ registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
id: base
run: >-
- BASE_TAG=docker.pkg.github.com/${{ github.repository_owner }}/otp/${{ matrix.type }}
+ BASE_TAG=ghcr.io/${{ github.repository_owner }}/otp/${{ matrix.type }}
BASE_USE_CACHE=false
.github/scripts/build-base-image.sh "${{ matrix.branch }}"
- name: Push master image
diff --git a/HOWTO/DEVELOPMENT.md b/HOWTO/DEVELOPMENT.md
index 67f8119d17..b9be3026e1 100644
--- a/HOWTO/DEVELOPMENT.md
+++ b/HOWTO/DEVELOPMENT.md
@@ -539,7 +539,7 @@ build it locally if you want to.
Using the pre-built base you build an image like this:
```bash
-docker login docker.pkg.github.com
+docker login ghcr.io
git archive --prefix otp/ -o .github/otp.tar.gz HEAD
docker build -t my_otp_image -f .github/dockerfiles/Dockerfile.64-bit .github/
```
@@ -550,7 +550,7 @@ in order to fetch the base image. If you want to build the base image locally
you can do that like this:
```bash
-docker build -t docker.pkg.github.com/erlang/otp/ubuntu-base \
+docker build -t ghcr.io/erlang/otp/ubuntu-base \
--build-arg BASE=ubuntu:20.04 --build-arg USER=otptest --build-arg uid=$(id -u) \
--build-arg GROUP=uucp --build-arg gid=$(id -g) \
-f .github/dockerfiles/Dockerfile.ubuntu-base .github/