Skip to content

fix(artifacts): switch from sts to presigned put (#1401) #155

fix(artifacts): switch from sts to presigned put (#1401)

fix(artifacts): switch from sts to presigned put (#1401) #155

Workflow file for this run

# name of the action
name: prerelease
# trigger on push events with `v*` in tag
on:
push:
tags:
- "v*"
permissions:
contents: read
# pipeline to execute
jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- name: clone
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# ensures we fetch tag history for the repository
fetch-depth: 0
- name: install go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true
- name: setup
run: |
# setup git tag in Actions environment
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: build
env:
GOOS: linux
CGO_ENABLED: "1"
run: |
make build-static-ci
- name: login to dockerhub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: extract metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: target/vela-server
tags: |
# only on push tag, "raw" because {{version}} strips "v" prefix
type=semver,pattern={{raw}}
- name: build and push image
id: push
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
prerelease_alpine:
runs-on: ubuntu-latest
steps:
- name: clone
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# ensures we fetch tag history for the repository
fetch-depth: 0
- name: install go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true
- name: setup
run: |
# setup git tag in Actions environment
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: build
env:
GOOS: linux
CGO_ENABLED: "1"
run: |
make build-static-ci
- name: login to dockerhub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: extract metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: target/vela-server
tags: |
# only on push tag, "raw" because {{version}} strips "v" prefix
type=semver,pattern={{raw}},suffix=-alpine
- name: build and push image
id: push
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
file: ./Dockerfile-alpine
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}