From b4c4b62b60bd02a6e0653b156510e300c66caad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= Date: Tue, 9 Apr 2024 23:27:16 +0200 Subject: [PATCH] ci: Automate pushing container images --- .github/workflows/container-images.yml | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/container-images.yml diff --git a/.github/workflows/container-images.yml b/.github/workflows/container-images.yml new file mode 100644 index 00000000..0ee4695f --- /dev/null +++ b/.github/workflows/container-images.yml @@ -0,0 +1,28 @@ +# SPDX-FileCopyrightText: 2024 Jonah BrĂ¼chert +# SPDX-License-Identifier: CC0-1.0 + +name: Build and publish CI container images + +on: + push: + paths: + - "ci/container/Containerfile" + branches: + - "main" + workflow_dispatch: + + +jobs: + publish-container: + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Build images + run: docker build -t ghcr.io/public-transport/transitous/import:latest . -f ci/container/Containerfile + - name: Log into ghcr.io + run: docker login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ghrc.io + - name: Push images + run: docker push ghcr.io/public-transport/transitous/import:latest