2023-04-27 06:08:41 +02:00
|
|
|
name: release-nightly
|
2023-02-26 05:16:38 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
goreleaser:
|
2023-03-01 05:32:00 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-02-26 05:16:38 +01:00
|
|
|
steps:
|
2024-03-14 14:27:47 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-26 05:20:47 +01:00
|
|
|
with:
|
2023-04-19 11:46:52 +02:00
|
|
|
fetch-depth: 0 # all history for all branches and tags
|
2024-03-14 14:27:47 +01:00
|
|
|
- uses: actions/setup-go@v5
|
2023-04-19 11:46:52 +02:00
|
|
|
with:
|
2024-03-14 14:27:47 +01:00
|
|
|
go-version-file: 'go.mod'
|
2023-02-26 06:34:26 +01:00
|
|
|
- name: goreleaser
|
2024-03-14 14:27:47 +01:00
|
|
|
uses: goreleaser/goreleaser-action@v5
|
2023-02-26 05:16:38 +01:00
|
|
|
with:
|
2023-08-10 03:45:25 +02:00
|
|
|
distribution: goreleaser-pro
|
|
|
|
version: latest
|
|
|
|
args: release --nightly
|
2023-02-26 05:16:38 +01:00
|
|
|
env:
|
|
|
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
2023-02-26 06:00:36 +01:00
|
|
|
AWS_REGION: ${{ secrets.AWS_REGION }}
|
2023-02-27 08:30:35 +01:00
|
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
|
2023-02-26 06:00:36 +01:00
|
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
2023-02-27 07:42:57 +01:00
|
|
|
S3_REGION: ${{ secrets.AWS_REGION }}
|
|
|
|
S3_BUCKET: ${{ secrets.AWS_BUCKET }}
|
2024-03-27 11:51:45 +01:00
|
|
|
GORELEASER_FORCE_TOKEN: 'gitea'
|
|
|
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2023-04-27 06:08:41 +02: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 14:27:47 +01:00
|
|
|
uses: actions/checkout@v4
|
2023-04-27 06:08:41 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # all history for all branches and tags
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
2023-11-24 04:05:00 +01:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-04-27 06:08:41 +02:00
|
|
|
|
|
|
|
- name: Set up Docker BuildX
|
2023-11-24 04:05:07 +01:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-04-27 06:08:41 +02:00
|
|
|
|
|
|
|
- name: Login to DockerHub
|
2023-11-24 04:05:22 +01:00
|
|
|
uses: docker/login-action@v3
|
2023-04-27 06:08:41 +02: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 09:02:39 +02:00
|
|
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
2023-04-27 06:08:41 +02:00
|
|
|
|
|
|
|
- name: Build and push
|
2023-11-24 04:05:28 +01:00
|
|
|
uses: docker/build-push-action@v5
|
2023-04-27 06:08:41 +02: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 07:27:35 +02:00
|
|
|
- name: Build and push dind-rootless
|
2023-11-24 04:05:28 +01:00
|
|
|
uses: docker/build-push-action@v5
|
2023-06-15 07:27:35 +02: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
|