2023-04-27 07:08:41 +03:00
name : release-nightly
2023-02-26 07:16:38 +03:00
on :
push :
branches : [ main ]
2024-04-10 10:06:08 +03:00
tags :
- '*'
2023-02-26 07:16:38 +03:00
jobs :
goreleaser :
2023-03-01 07:32:00 +03:00
runs-on : ubuntu-latest
2023-02-26 07:16:38 +03:00
steps :
2024-03-14 16:27:47 +03:00
- uses : actions/checkout@v4
2023-02-26 07:20:47 +03:00
with :
2023-04-19 12:46:52 +03:00
fetch-depth : 0 # all history for all branches and tags
2024-03-14 16:27:47 +03:00
- uses : actions/setup-go@v5
2023-04-19 12:46:52 +03:00
with :
2024-03-14 16:27:47 +03:00
go-version-file : 'go.mod'
2023-02-26 08:34:26 +03:00
- name : goreleaser
2024-03-14 16:27:47 +03:00
uses : goreleaser/goreleaser-action@v5
2023-02-26 07:16:38 +03:00
with :
2023-08-10 04:45:25 +03:00
distribution : goreleaser-pro
version : latest
args : release --nightly
2023-02-26 07:16:38 +03:00
env :
GORELEASER_KEY : ${{ secrets.GORELEASER_KEY }}
2023-02-26 08:00:36 +03:00
AWS_REGION : ${{ secrets.AWS_REGION }}
2023-02-27 10:30:35 +03:00
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_KEY_ID }}
2023-02-26 08:00:36 +03:00
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2023-02-27 09:42:57 +03:00
S3_REGION : ${{ secrets.AWS_REGION }}
S3_BUCKET : ${{ secrets.AWS_BUCKET }}
2024-03-27 13:51:45 +03:00
GORELEASER_FORCE_TOKEN : 'gitea'
GITEA_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2023-04-27 07:08:41 +03:00
release-image :
runs-on : ubuntu-latest
container :
image : catthehacker/ubuntu:act-latest
env :
DOCKER_ORG : gitea
DOCKER_LATEST : nightly
steps :
- name : Checkout
2024-03-14 16:27:47 +03:00
uses : actions/checkout@v4
2023-04-27 07:08:41 +03:00
with :
fetch-depth : 0 # all history for all branches and tags
- name : Set up QEMU
2023-11-24 06:05:00 +03:00
uses : docker/setup-qemu-action@v3
2023-04-27 07:08:41 +03:00
- name : Set up Docker BuildX
2023-11-24 06:05:07 +03:00
uses : docker/setup-buildx-action@v3
2023-04-27 07:08:41 +03:00
- name : Login to DockerHub
2023-11-24 06:05:22 +03:00
uses : docker/login-action@v3
2023-04-27 07:08:41 +03:00
with :
username : ${{ secrets.DOCKER_USERNAME }}
password : ${{ secrets.DOCKER_PASSWORD }}
- name : Get Meta
id : meta
run : |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
2023-04-27 10:02:39 +03:00
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
2023-04-27 07:08:41 +03:00
- name : Build and push
2023-11-24 06:05:28 +03:00
uses : docker/build-push-action@v5
2023-04-27 07:08:41 +03:00
with :
context : .
file : ./Dockerfile
platforms : |
linux/amd64
linux/arm64
push : true
tags : |
${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
2023-06-15 08:27:35 +03:00
- name : Build and push dind-rootless
2023-11-24 06:05:28 +03:00
uses : docker/build-push-action@v5
2023-06-15 08:27:35 +03:00
env :
ACTIONS_RUNTIME_TOKEN : '' # See https://gitea.com/gitea/act_runner/issues/119
with :
context : .
file : ./Dockerfile.rootless
platforms : |
linux/amd64
linux/arm64
push : true
tags : |
${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}-dind-rootless