-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Automate pushing container images
- Loading branch information
1 parent
37f2dc1
commit c9dffa1
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]> | ||
# 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 }} ghcr.io | ||
- name: Push images | ||
run: docker push ghcr.io/public-transport/transitous/import:latest |