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