Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Commit 3d225fd

Browse files
authored
Merge pull request #11 from CSCfi/devel
bump to version 0.1.4
2 parents 5348968 + dd1f4eb commit 3d225fd

File tree

3 files changed

+52
-30
lines changed

3 files changed

+52
-30
lines changed

.github/workflows/publish.yml

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,49 @@ jobs:
1111
name: Push swift upload runner Docker image to Docker Hub
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v1
15-
- name: Login to DockerHub Registry
16-
run: echo '${{ secrets.DOCKER_PASSWORD }}' | docker login -u '${{ secrets.DOCKER_USERNAME }}' --password-stdin
17-
- name: Get the version
18-
id: vars
19-
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
20-
- name: Build the tagged Docker image
21-
if: ${{ steps.vars.outputs.tag != '/master' && steps.vars.outputs.tag != '/devel' }}
22-
run: docker build . --file Dockerfile --tag cscfi/swiftui-upload-runner:${{steps.vars.outputs.tag}}
23-
- name: Push the tagged Docker image
24-
if: ${{ steps.vars.outputs.tag != '/master' && steps.vars.outputs.tag != '/devel' }}
25-
run: docker push cscfi/swiftui-upload-runner:${{steps.vars.outputs.tag}}
26-
- name: Build the latest Docker image
27-
if: ${{ steps.vars.outputs.tag == '/master' }}
28-
run: docker build . --file Dockerfile --tag cscfi/swiftui-upload-runner:latest
29-
- name: Push the latest Docker image
30-
if: ${{ steps.vars.outputs.tag == '/master' }}
31-
run: docker push cscfi/swiftui-upload-runner:latest
32-
- name: Build the stage Docker image
33-
if: ${{ steps.vars.outputs.tag == '/devel' }}
34-
run: docker build . --file Dockerfile --tag cscfi/swiftui-upload-runner:stage
35-
- name: Push the stage Docker image
36-
if: ${{ steps.vars.outputs.tag == '/devel' }}
37-
run: docker push cscfi/swiftui-upload-runner:stage
14+
- name: Check out the repo
15+
uses: actions/checkout@v2
16+
17+
- name: Prepare
18+
id: prep
19+
run: |
20+
DOCKER_IMAGE=cscfi/swiftui-upload-runner
21+
VERSION=edge
22+
if [[ $GITHUB_REF == refs/tags/* ]]; then
23+
VERSION=${GITHUB_REF#refs/tags/}
24+
elif [[ $GITHUB_REF == refs/heads/* ]]; then
25+
BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
26+
if [[ $BRANCH == master ]]; then
27+
VERSION=latest
28+
elif [[ $BRANCH == devel ]]; then
29+
VERSION=stage
30+
fi
31+
fi
32+
TAGS="${DOCKER_IMAGE}:${VERSION}"
33+
echo ::set-output name=version::${VERSION}
34+
echo ::set-output name=tags::${TAGS}
35+
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
36+
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v1
39+
40+
- name: Login to DockerHub
41+
if: github.event_name != 'pull_request'
42+
uses: docker/login-action@v1
43+
with:
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
47+
- name: Build and push
48+
uses: docker/build-push-action@v2
49+
with:
50+
context: .
51+
file: ./Dockerfile
52+
push: ${{ github.event_name != 'pull_request' }}
53+
tags: ${{ steps.prep.outputs.tags }}
54+
cache-from: type=registry,ref=cscfi/swiftui-upload-runner:latest
55+
cache-to: type=inline
56+
labels: |
57+
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
58+
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
59+
org.opencontainers.image.revision=${{ github.sha }}

.github/workflows/style.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414

1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v2
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install dependencies

swift_upload_runner/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Runner for swift-browser-ui upload and replication operations."""
22

3-
__name__ = 'swift_upload_runner'
4-
__version__ = '0.1.3'
5-
__author__ = 'CSC Developers'
6-
__license__ = 'MIT License'
3+
__name__ = "swift_upload_runner"
4+
__version__ = "0.1.4"
5+
__author__ = "CSC Developers"
6+
__license__ = "MIT License"

0 commit comments

Comments
 (0)