From 698fe2ff74847c00405fb646597df487d59999d8 Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Mon, 20 Jun 2022 19:43:34 -0700 Subject: [PATCH 1/3] Dockerfile: specify Fedora's registry as the source for the base image In some cases the docker.io source lags behind upstream, so be explicit about where the image should come from. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9551edc5..b04c8444 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM fedora:latest +FROM registry.fedoraproject.org/fedora:latest RUN dnf update -y && \ dnf install -y dbus-daemon flatpak flatpak-builder git-lfs python3-aiohttp python3-tenacity python3-gobject xorg-x11-server-Xvfb ccache zstd && \ From 5a78dec2d3d2e25be591ceaa3562215dbc843e9f Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Mon, 20 Jun 2022 19:50:20 -0700 Subject: [PATCH 2/3] ci: bump docker actions to the latest stable release * bump `docker/build-push-action` to v3 * bump `docker/login-action` to v2 * bump `docker/setup-buildx-action` to v2 * bump `docker/setup-qemu-action` to v2 --- .github/workflows/docker.yml | 8 ++++---- .github/workflows/flatpak-test.yml | 2 +- README.md | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 70a9aa86..1748610b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -84,7 +84,7 @@ jobs: uses: actions/checkout@v2.3.4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.1.1 + uses: docker/setup-buildx-action@v2 with: driver-opts: network=host @@ -97,7 +97,7 @@ jobs: ${{ runner.os }}-buildx- - name: Build & push the Fedora base image to local registry - uses: docker/build-push-action@v2.2.2 + uses: docker/build-push-action@v3 with: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache @@ -108,7 +108,7 @@ jobs: tags: localhost:5000/fedora-base:latest - name: Login to Docker Hub - uses: docker/login-action@v1.8.0 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -122,7 +122,7 @@ jobs: RUN --security=insecure flatpak install -y --noninteractive ${{matrix.runtime.remote}} ${{ matrix.runtime.packages }} - name: Build & push the ${{ matrix.runtime.name }} image to Docker Hub - uses: docker/build-push-action@v2.2.2 + uses: docker/build-push-action@v3 with: allow: security.insecure context: . diff --git a/.github/workflows/flatpak-test.yml b/.github/workflows/flatpak-test.yml index 7f2282a6..81a89715 100644 --- a/.github/workflows/flatpak-test.yml +++ b/.github/workflows/flatpak-test.yml @@ -23,7 +23,7 @@ jobs: dnf -y install docker - name: Set up QEMU if: ${{ matrix.arch != 'x86_64' }} - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: arm64 - uses: ./flatpak-builder diff --git a/README.md b/README.md index 4eb21003..9385827d 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ jobs: dnf -y install docker - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 with: platforms: arm64 - uses: flatpak/flatpak-github-actions/flatpak-builder@v4 From afb022616e0710b9f7348d782d4427d0bb1344cd Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Sun, 3 Jul 2022 13:55:41 -0700 Subject: [PATCH 3/3] ci: migrate to GitHub Container Registry Migrate the container images from DockerHub to GitHub's container registry. fixes #60 --- .github/workflows/docker.yml | 9 +++++---- .github/workflows/flatpak-test.yml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1748610b..1e7d9174 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -107,11 +107,12 @@ jobs: push: true tags: localhost:5000/fedora-base:latest - - name: Login to Docker Hub + - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Write the Dockerfile for the ${{ matrix.runtime.name }} runtime run: | @@ -128,4 +129,4 @@ jobs: context: . file: ${{ matrix.runtime.name }}.Dockerfile push: true - tags: bilelmoussaoui/flatpak-github-actions:${{ matrix.runtime.name }} + tags: ghcr.io/${{ github.repository }}:${{ matrix.runtime.name }} diff --git a/.github/workflows/flatpak-test.yml b/.github/workflows/flatpak-test.yml index 81a89715..52a9c40a 100644 --- a/.github/workflows/flatpak-test.yml +++ b/.github/workflows/flatpak-test.yml @@ -9,7 +9,7 @@ jobs: name: Flatpak Builder runs-on: ubuntu-latest container: - image: bilelmoussaoui/flatpak-github-actions:gnome-40 + image: ghcr.io/${{ github.repository }}:gnome-40 options: --privileged strategy: fail-fast: false