forked from pleasanthill17/teslamate-abrp
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
!+ Build is now separated into three separate workflows: - build_alpha that builds the bleeding edge to an :alpha tag available on DockerHub and ghcr (corresponds to the old :beta). This image is automatically re-built fortnightly to include upstream docker images changes. - build_beta which builds pre-releases to a :beta tag available on DockerHub and ghcr. - build_latest which builds pre-releases to a :latest tag (and its corresponding version tag) available on DockerHub and ghcr. + fixed the broken "build" badge in the README and added one badge to each corresponding tag.
- Loading branch information
Showing
4 changed files
with
132 additions
and
18 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,63 @@ | ||
# Build for amd64 and arm64 and publish to DockerHub and GitHub Packages | ||
# Bleeding edge of main published as :alpha | ||
# The :alpha image is automatically re-built and pushed fortnightly to include changes to upstream images | ||
|
||
name: :alpha | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
schedule: | ||
- cron: "37 1 */1,*/14 * *" | ||
|
||
jobs: | ||
push_to_registries: | ||
name: Push Docker image to multiple registries | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup QEMU | ||
uses: docker/[email protected] | ||
|
||
- name: Setup buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Log in to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Log in to the GitHub Packages container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
fetzu/teslamate-abrp | ||
ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
- name: Build and push Docker image with 'alpha' tag | ||
if: github.ref == 'refs/heads/main' | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||
push: true | ||
tags: | | ||
fetzu/teslamate-abrp:alpha, | ||
ghcr.io/${{ github.repository }}:alpha | ||
labels: ${{ steps.meta.outputs.labels }} |
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,64 @@ | ||
# Build for amd64 and arm64 and publish to DockerHub and GitHub Packages | ||
# Pre-release published as :beta | ||
|
||
name: :beta | ||
|
||
on: | ||
release: | ||
types: | ||
- 'prereleased' | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
push_to_registries: | ||
name: Push Docker image to multiple registries | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup QEMU | ||
uses: docker/[email protected] | ||
|
||
- name: Setup buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Log in to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Log in to the GitHub Packages container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
fetzu/teslamate-abrp | ||
ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
- name: Build and push Docker images for pre-releases (:beta) | ||
if: github.event_name == 'prereleased' | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||
push: true | ||
tags: | | ||
${{ steps.meta.outputs.tags }}, | ||
fetzu/teslamate-abrp:beta, | ||
ghcr.io/${{ github.repository }}:beta | ||
labels: ${{ steps.meta.outputs.labels }} |
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
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