Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Create Release
|
|
|
|
on:
|
|
pull_request:
|
|
types: [closed]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
create-release:
|
|
if: |
|
|
github.event_name == 'pull_request' &&
|
|
github.event.action == 'closed' &&
|
|
github.event.pull_request.merged == true &&
|
|
contains(github.event.pull_request.labels.*.name, 'release')
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Get current date
|
|
id: date
|
|
run: echo "::set-output name=date::$(date --rfc-3339=date)"
|
|
|
|
- name: Checkout branch "master"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: 'master'
|
|
|
|
- name: Tag release in GitHub
|
|
uses: tvdias/github-tagger@v0.0.2
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: server-${{ steps.date.outputs.date }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push snapshot release to DockerHub
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: shieldsio/shields:server-${{ steps.date.outputs.date }}
|
|
build-args: |
|
|
version=server-${{ steps.date.outputs.date }}
|