-
Notifications
You must be signed in to change notification settings - Fork 13
32 lines (31 loc) · 1.07 KB
/
publish_v1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: publish@v1
on:
push:
tags: [ 'v1.*' ]
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: update tag
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git tag -fa v1 -m "update v1 tag"
git push origin v1 --force
image:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: docker build
run: |
docker build -t ghcr.io/bobheadxi/gobenchdata:latest .
docker tag ghcr.io/bobheadxi/gobenchdata:latest ghcr.io/bobheadxi/gobenchdata:$(git describe --tags)
docker tag ghcr.io/bobheadxi/gobenchdata:latest ghcr.io/bobheadxi/gobenchdata:v1
- name: Publish to GitHub Container Registry
run: |
echo ${{ secrets.ACCESS_TOKEN }} | docker login ghcr.io --username $GITHUB_ACTOR --password-stdin
docker push ghcr.io/bobheadxi/gobenchdata:$(git describe --tags)
docker push ghcr.io/bobheadxi/gobenchdata:v1