forked from drdaeman/docker-emailrelay
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8cc2bf
commit eb13c46
Showing
4 changed files
with
54 additions
and
75 deletions.
There are no files selected for viewing
39 changes: 19 additions & 20 deletions
39
.github/workflows/build-and-push-on-tags.yml → .github/workflows/build-latest.yml
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 |
---|---|---|
@@ -1,47 +1,46 @@ | ||
name: build-and-push-on-tags | ||
name: build-latest | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
paths-ignore: | ||
- LICENSE | ||
- docker-compose.yml | ||
# branches: | ||
# - main | ||
|
||
jobs: | ||
build-push-latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Get version from Dockerfile | ||
id: version_provider | ||
run: | | ||
VERSION=$(grep 'ARG BASE_VERSION' Dockerfile | awk -F= '{print $2}') | ||
echo "::set-output name=version::$VERSION" | ||
- name: debug | ||
run: | | ||
echo "::debug:: ${{steps.version_provider.outputs.version}}" | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.ref == 'refs/heads/main' }} | ||
cache-from: | | ||
dcagatay/emailrelay:latest | ||
tags: | | ||
dcagatay/emailrelay:latest | ||
dcagatay/emailrelay:${{steps.version_provider.outputs.version}} | ||
- name: Update repo description | ||
uses: peter-evans/dockerhub-description@v4 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
repository: dcagatay/emailrelay |
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,35 @@ | ||
name: build-tags | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build-push-tags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
cache-from: | | ||
dcagatay/emailrelay:latest | ||
tags: | | ||
dcagatay/emailrelay:${{ github.ref_name }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.